GraphQL
GraphQL is a strongly typed API query language developed by Facebook: the client declares the fields it needs and the server returns exactly matching data, avoiding over- and under-fetching.
Purpose
It offers a single on-demand query endpoint for APIs, solving REST's over-fetching and multiple-request problems, with strong typing and introspection.
Mechanism
The client sends a query/mutation/subscription document; the server validates it against the schema, runs resolver functions to fetch the data, and returns JSON matching the query's shape. The schema defines the types and entry points.
Use cases
- API data queries
- On-demand data fetching on mobile
- Unified API gateways
Related tools
JSON Formatter
Format, minify, or sort JSON online. Free, private, and 100% client-side. TOOL
JSON Validator
Validate JSON and pinpoint syntax errors by line and column. Free, private, and 100% client-side. TOOL
GraphQL Format
Pretty-print GraphQL with indentation. TOOL
GraphQL Minify
Minify GraphQL by removing whitespace. TOOL
GraphQL Validate
Validate GraphQL by checking brace balance only. Braces inside string literals are counted too, so an argument containing } (e.g. s(v: "}")) can trigger a false BRACE_MISMATCH; full GraphQL syntax is not validated. TOOL