Use this tool to validate GraphQL queries against a GraphQL schema.
GraphQL is a popular, modern approach for building APIs. GraphQL APIs come with a schema that describes the data model and allows clients to query and mutate the data.
A GraphQL schema defines the data fields/elements that are available in the API, essentially defining the underlying data model/contract between the client and the server.
The schema is written in the GraphQL Schema Definition Language (SDL) and primarily defines the object types, fields, and their relationships. (I find GraphQL SDL to be very elegant and expressive for capturing logical data models.)
The defined data model represents the data as a graph of JSON-like objects that are interconnected and can be queried/mutated using GraphQL queries.
GraphQL queries are JSON-like documents that describe the data that the client wants to retrieve or modify. GraphQL servers can only process queries that are well-formed and conform to the defined data model.
Writing GraphQL queries requires adherence to the defined schema. Both the queries and schema can become quite complex which can lead to queries failing unexpectedly when they don't conform to the schema.
I hope that you find this tool useful for validating or troubleshooting your queries.
I built this tool on top of the GraphQL.js library. I use the library to build the schema from SDL, parse the query from source, and validate the query against the schema. All this runs purely on the client.