
Generating type safe clients using code generation | GraphQL
Sep 18, 2024 · A common mistake is to attempt to use the GraphQL schema directly for type generation, but this is not type-safe since GraphQL only returns the fields that you ask for, and …
Schemas and Types | GraphQL
As we saw with the Object type example above, GraphQL supports two type modifiers—the List and Non-Null types—and they can be used individually or in combination with each other.
Global Object Identification - GraphQL
To provide options for GraphQL clients to elegantly handle caching and data refetching, GraphQL servers need to expose object identifiers in a standardized way.
Queries - GraphQL
This is essential to GraphQL, because you always get back what you expect, and the server knows exactly what fields the client is asking for. In the previous example, we just asked for …
Response | GraphQL
This key is reserved for GraphQL implementations to provide additional information about the response and though it must be an object if present, there are no other restrictions on what it …
Schema Design - GraphQL
When designing a GraphQL schema, it’s important to keep in mind all the problems that could go wrong and if “null” is an appropriate value for a failed field.
Mocking your server is easy with GraphQL
Apr 18, 2016 · With GraphQL, there is no excuse to not mock your backend for development or testing. Here’s how easy it is to create a mocked backend that will accept any valid GraphQL …
Mutations | GraphQL
Thus, for any spec-compliant GraphQL schemas, only the top-level fields in mutation operations are allowed to cause side effects. On this page, you’ll learn how to use mutation operations to …
Common HTTP Errors and How to Debug Them | GraphQL
This guide outlines common HTTP and GraphQL errors, what they mean, and how to debug them effectively. It follows the recommendations of the GraphQL over HTTP spec (draft), which …
Serving over HTTP - GraphQL
Though not yet finalized, this draft specification acts as a single source of truth for GraphQL client and library maintainers, detailing how to expose and consume a GraphQL API using an HTTP …