GraphQL Query Builder and Schema Explorer

Point it at a GraphQL endpoint, fetch the schema, click through types, tick fields to build a query, then run it with variables and view the result.

Работи във вашия браузър. Файловете ви никога не напускат устройството. Вижте как да го проверите

…

Как се прави

  1. 1
    Enter the endpoint

    Type the GraphQL URL and add any headers your API needs.

  2. 2
    Load the schema

    Press Fetch schema, or Open schema JSON if introspection is off.

  3. 3
    Explore types

    In Schema explorer search types and follow return-type links.

  4. 4
    Build a query

    In Query builder tick fields, expand objects and fill arguments or $variables.

  5. 5
    Run it

    Use in editor, enter variables as JSON and press Run or Ctrl+Enter.

  6. 6
    Keep the results

    Copy or download the response, the query and schema.graphql.

За този инструмент

GraphQL servers can describe themselves: the introspection query asks the server for every type, field, argument and enum it supports. This explorer sends that query, turns the answer into a browsable schema and a printable SDL file, and uses it to drive a point-and-click query builder. Tick the fields you want, open nested objects, type argument values or $variables, and the query text is written for you. Then run it in the editor with JSON variables and custom headers, and read the formatted response with any GraphQL errors listed separately. It starts connected to the public Countries API so you can try it straight away.

Who it is for

Developers joining a project with an unfamiliar GraphQL API, front-end engineers shaping queries for a component, testers checking edge cases, and learners who want to see how a schema and a query relate.

Getting the schema

Press Fetch schema to send the standard introspection query to the endpoint. If the server has introspection switched off, which many production APIs do, ask the team for an introspection JSON file (for example from a schema registry or a code generator) and use Open schema JSON. Both the { data: { __schema } } shape and the bare __schema object are accepted.

Schema explorer and SDL

The type list can be searched. Selecting a type shows its kind, description, interfaces, fields with arguments and return types, enum values and the members of unions. Return types are links, so you can follow Order to Customer to Address without typing. The SDL tab prints the whole schema in the GraphQL schema definition language, with descriptions and @deprecated reasons, ready to download as schema.graphql.

Query builder

Choose Query or Mutation, tick fields and expand objects with the ▸ arrow. When a field takes arguments, inputs appear: type a literal such as "BD", 10 or true, or $code to turn it into a variable. The builder declares variables with the exact argument types, for example ($code: ID!), and adds __typename where you picked an object without sub-fields so the query stays valid.

Running queries

Queries are posted as JSON with query, variables and an optional operationName. Headers such as Authorization are added from the Headers panel. The response view shows HTTP status, time and a separate list of GraphQL errors with line numbers.

Worked example

With the Countries endpoint, fetch the schema, tick country, then name, capital and currency, and type $code in its code argument. The builder writes query MyQuery($code: ID!) { country(code: $code) { name capital currency } }. Use it in the editor with { "code": "BD" } and the response returns Bangladesh, Dhaka and BDT.

Limits

The endpoint must accept cross-origin requests from browsers. Subscriptions over WebSocket are not run here, file uploads are not supported and very large schemas may be slow to browse on phones. Query validation is done by the server, not by this page, so a typo shows up as a server error.

Решен пример

country(code: $code) with code "BD" returns name Bangladesh, capital Dhaka, currency BDT.

Накратко

Често задавани въпроси

What if introspection is disabled?

Open an introspection JSON file exported from your schema registry or tooling with Open schema JSON.

Can I add an Authorization header?

Yes. Open Headers, add the header, tick it, and it is sent with both introspection and queries.

Does the builder support mutations?

Yes, when the schema has a mutation type. Switch to Mutation and tick the mutation fields.

How do variables work?

Type $name as an argument value; the builder declares it with the argument's type and you fill values as JSON.

Can I download the schema?

The SDL tab prints the schema and downloads it as schema.graphql.

Is anything sent to shobfree.com?

No. Requests go from your browser to the endpoint you entered and nowhere else.

Напълно безплатноБез такса, без регистрация
Файловете остават поверителниВсичко работи във вашия браузър
Лесно на вашия езикНалично на много езици