GraphQL Fragment Merger

GraphQL Fragment Merger MCP Connector for Claude

A+

Deterministically inlines GraphQL fragments into a single query string.

1 tools Official Updated Oct 1, 2026 Official Vinkius Partner

The GraphQL Fragment Merger solves the problem of AI agents sending fragmented queries to servers that do not support fragment spreads. By using merge_graphql_fragments, you can provide a raw GraphQL query containing spread operators (...FragmentName) and fragment definitions. The tool recursively identifies these fragments and replaces every spread with its exact body fields using deterministic string manipulation. This ensures the resulting merged_query_string is a single, valid, and complete GraphQL operation, making it compatible with any standard GraphQL endpoint.

graphqlfragmentsquery-mergerapi-compatibilitydeterministic

1 tools expose this connector's capabilities to your AI agent.

merge_graphql_fragments

Inlines GraphQL fragments into the main query deterministically

See how to talk to your AI agent using GraphQL Fragment Merger.

Merge this GraphQL query: 'query { user { ...UserFields } } fragment UserFields on User { id name }'

query { user { id name } }

Can you inline fragments for this query?

Please provide the GraphQL query string you would like me to process using `merge_graphql_fragments`.

Check if these fragments are correctly merged: 'query { node { ...Node } } fragment Node on Node { id }'

The merged query is: query { node { id } }

It takes a GraphQL query string with fragments and returns a single, flattened query string where all fragment spreads have been replaced by their actual field definitions.

Related Connectors