• ANALYSIS
  • VALIDATION
  • OPTIMIZATION
  • HUMAN

How to debug GraphQL query performance with your agent

Connect Hasura to your agent to find slow queries. It looks at the underlying SQL execution plans to find the root cause.

Ask AI about this page

Our technology reaches across leading technology and enterprise teams.

  • Amazon
  • NVIDIA
  • Red Hat
  • Fidelity Investments
  • Intuit
  • OLX Brasil
  • Writesonic
  • Artium
  • Trolley
Bunny World Voxel Workspace

Short answer

How can I use AI to find slow GraphQL queries?

Your agent uses Hasura to run specific queries and pull their SQL execution plans. It then analyzes those plans to identify missing indexes or inefficient joins. You get a clear breakdown of where the database is struggling.

The results.

Where your performance data lands.

Your agent processes your Hasura data into these specific outcomes.

ANALYSIS

Execution plan insights

Your agent uses explain_graphql to pull the SQL plan. You get a plain English explanation of why a query is slow.

VALIDATION

Query testing results

Your agent runs execute_graphql to verify if a fix actually works. You see the real-time response from your Hasura engine.

OPTIMIZATION

Index recommendations

By looking at the scan types in the execution plan, your agent suggests which columns need new indexes to stop full table scans.

HUMAN

Manual schema changes

Your agent identifies the problem, but you must apply the actual SQL migrations or index changes in Hasura. Your agent cannot modify your database schema.

The workflow

What your agent does when a slow query is reported.

Your agent moves from identifying the query to analyzing the database behavior.

  1. Fetch the query

    Your agent pulls the specific GraphQL query you are worried about to understand its structure.

    execute_graphql
  2. Inspect the plan

    It requests the underlying SQL execution plan from Hasura to see how the database handles the request.

    explain_graphql
  3. Identify bottlenecks

    Your agent compares the query structure against the execution plan to find slow joins or unindexed scans.

    explain_graphql
  4. Verify the fix

    Once you propose a change, your agent runs the query again to confirm the performance improvement.

    execute_graphql

Vinkius Agentic Execution Platform

State the outcome. Agents take it from there.

You don't have to drive this run by hand. Inside the Vinkius Agentic Execution Platform, agents pick up the task above and carry it to the end: you set the limits, you watch the steps, you keep all decisions.

Run it in Vinkius

Agents carry the task to the end

Agents execute Hasura tasks from end to end inside the Vinkius Agentic Execution Platform: set the outcome, and the steps run.

Take it to any compatible AI

One connection, any client

Same connection follows you to ChatGPT, Claude, Gemini and any other client you love. Switch whenever you want: your connection, your permissions and your record move with you.

Spaces

One Space per activity

A Space gathers the context, tools and tasks of one activity, so you coordinate several agents at once and follow each execution as it happens.

Limits

Autonomy inside limits you set

Permissions and spending limits are yours to define. Agents halt for your approval on anything sensitive, and you choose how far autonomy goes, step by step or end to end.

Record

All steps, on the record

Each action your agents take lands in a signed audit trail. Results are verified, mistakes are learned from, and an emergency stop is one click away.

Models

Included in your plan

A curated selection of AI models is included in your plan, and you can add your own through BYOK whenever you prefer.

Try it

Copy these to start.

Use these prompts to kick off a debugging session.

Starting points

Swap out the bracketed text with your actual GraphQL query or table names.

Hasura Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_Q19k5WrSMOV2zDZs6DlIbmRJGyWfSnbLHJlhJLmt/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat, Hasura capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "hasura-instant-graphql-rest-engine-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_Q19k5WrSMOV2zDZs6DlIbmRJGyWfSnbLHJlhJLmt/mcp"
    }
  }
}
Copy into chat04
  • 01

    Run the GraphQL query {query} and explain why it might be slow.

  • 02

    Get the execution plan for this query: {query}.

  • 03

    Analyze the execution plan for the query on the users table and check for missing indexes.

  • 04

    Compare the performance of this query {query} before and after I suggest an index change.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Hasura once, then ask.

Provide your Hasura endpoint. Your credentials stay encrypted, and you can immediately start debugging with your agent.

Connect Hasura to your agent

FAQ

How this task behaves.

  • 01

    Can your agent change my database schema?

    No. Your agent can only read data and execution plans. You have to run the actual migrations yourself.

  • 02

    Does your agent delete any data in Hasura?

    No. The tools provided are for executing queries and explaining plans; they do not include tools for deleting or dropping tables.

  • 03

    Can it find slow queries automatically?

    No. You need to provide the specific query or the table you are investigating so your agent knows what to analyze.

  • 04

    Will it fix my slow joins?

    It will identify that a join is slow and suggest a fix, but it cannot rewrite your database or add the indexes for you.

  • 05

    How does it know why a query is slow?

    It uses the explain_graphql tool to look at the SQL execution plan, which shows how the database engine is actually processing the request.

  • More questions about Hasura? See everything the Hasura Connector can do

Building with AI? Ship this whole workflow in your product.

Vinkius Connect is the connectivity layer for AI builders. All the capabilities used on this page, from Hasura to thousands more, arrive through one SDK, already maintained for you. One Application, unlimited seats, each with their own connectors and credentials, isolated and never exposed to Vinkius. No OAuth flows to write, no tokens to store, no APIs to chase.

Explore Vinkius Connect

TypeScript · Python · Java · Go · C# · PHP · Rust

  • 01

    Your customers bring their own keys.

    Each user connects their own apps and keeps their own credentials. Vinkius only sees the identifier your backend sends.

  • 02

    Whole catalog, kept current.

    Hasura plus thousands more, maintained and growing daily. No integrations to write, no token storage, no OAuth plumbing.

  • 03

    Any agent, any model.

    Capabilities land as framework-neutral objects, with adapters for OpenAI, Anthropic, Gemini, the Vercel AI SDK, LangChain and more.

Connect Hasura to Claude, Cursor, ChatGPT & more

From idea to done

See what gets done when the agents take over the busywork

Each workflow on this page runs on the same platform. Connect your tools once, and your agents keep working in any AI you trust.