GraphQL Structure

Count expanded syntactic fields and nesting depth for a selected GraphQL operation.

About this tool

Analyze one GraphQL operation locally. Choose an operation when a document contains several. Field depth starts at one for a root field; inline and named fragments do not add a level.

Expanded fields count each syntactic field occurrence after named-fragment expansion, including aliases and repeated selections. One unit per occurrence is a structural score, not execution cost. Directives, variable values and type conditions do not prune selections. No schema-based field merging, list multiplier, resolver timing or billing estimate.

The official GraphQL.js parser checks syntax. Duplicate operation/fragment names, mixed anonymous operations, missing fragment references and cycles are rejected, including unused cycles. No schema/type/argument validation or execution. Strings and comments do not alter nesting. Fragment totals are memoized and counted with exact integers without materializing expansions.

Limits: 65,536 characters, 20,000 tokens, delimiter nesting and fragment-reference chain up to 128. Analysis updates automatically. Only the exact raw document and selected operation name are kept through the shared local browser adapter; parsed documents and calculated metrics are not stored. Reordering operations preserves the selected name when it still exists. Empty input shows no result. No uploads.

GraphQL Specification