b2KIT

GraphQL Query Builder

Build GraphQL queries visually by selecting fields from a schema with variable and fragment support.

Tested tool guide Tested browser tools Checked August 16, 2026

What GraphQL Query Builder does and how it behaves

Starting from the supplied GraphQL schema, GraphQL Query Builder exposes available fields as choices and turns the chosen paths into a GraphQL operation document. Nested object fields become nested selection sets; arguments can use variables, and repeated selections can be represented with fragments. Its result is query text for a GraphQL request, not the JSON data that a server might return. The common surprise is that selecting an object field alone is incomplete: GraphQL requires subfields for composite results, so the user must continue choosing fields below it.

How the result is produced

1

Schema-guided field selection

The supplied schema defines fields reachable from its query root, their arguments, and their return types. Choosing a field whose return type is an object, interface, or union requires a nested selection; scalar and enum fields end a branch. The schema guides the document's structure, but argument values and application-specific meaning still come from the user.

2

Variables and fragments

Selections are assembled into a GraphQL operation. A variable is declared with a GraphQL input type at the operation boundary and referenced by its $-prefixed name in an argument. A named fragment records a reusable selection set with a type condition, while a fragment spread inserts that selection where the condition is compatible.

Good uses

  • Explore an unfamiliar GraphQL schema by following the query root into related object fields, then copy the resulting operation into an API client or application.
  • Turn a screen's data requirements into an explicit selection set, including typed variables for identifiers, filters, pagination arguments, or other values supplied when the request runs.
  • Define a fragment for fields repeated across several branches, such as an identifier, display name, and image, instead of manually reproducing the same selection in each location.

Limits and checks

  • A generated document does not prove that the live server will accept or authorize it. The supplied schema may be stale, and field access can depend on credentials or server-side rules not represented by field selection.
  • A variable definition describes a name, GraphQL input type, and possibly a default. The request's actual variable values are separate, so seeing $id: ID! in the query does not mean an ID value has been supplied.
  • Schema types do not reveal every runtime constraint. A custom scalar may require a particular serialized format, while a string or input object may have business rules that cannot be inferred from its GraphQL type alone.

Common questions

Why must I select fields beneath an object field?

GraphQL requires a selection set whenever a field returns a composite type. Selecting user is therefore insufficient if user returns a User object; fields such as id or name must also be selected. No child selection is allowed for scalar or enum results because those fields already resolve to leaf values.

Will the builder tell me every value a variable accepts?

No. The schema can identify the variable's GraphQL type, nullability, list structure, input fields, and declared enum choices. It generally cannot express undocumented business restrictions or the serialization rules of an unfamiliar custom scalar. Consult the service's documentation when the schema type does not fully define an acceptable runtime value.

References and verification

The behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools