As your GraphQL application grows from demo, to proof of concept, to production, the complexity of your schema and resolvers will grow in tandem. To organize your code, you’ll want to split up your schema types and the associated resolvers into multiple files.
In this post, we present a straightforward method for modularizing schemas built with
graphql-tools that you can tweak to match your tastes and your codebase. …
If you’ve heard about GraphQL, you’ve likely also heard about GraphQL clients such as Apollo Client or Relay. GraphQL is an API technology, so you can always access your API with a simple HTTP fetch. These client implementations offer a large number of data management features, so their core purpose can become a bit muddled. In this short post, I’ll go through why sophisticated GraphQL client clients are useful, and what they will and won’t do for you.
The best way to understand the value of something is to lose it. So, let’s first imagine a world where GraphQL clients didn’t exist and then, from that point of view, figure out what a GraphQL client implementation would have to do to be useful. …
Update: This post was originally written by Dhaivat Pandya in February 2017, but we’ve updated it since them (most recently in December 2017) to include the latest information on using persisted queries with Apollo.
If you’re a regular at a diner, you know that saying the full name of a dish is a rookie move. If you refer to the “double cheeseburger with bacon, fries and a coke” as a “#12”, you save yourself a bunch of words and enable the cashier to be more efficient in fulfilling your order.
There’s a popular concept in GraphQL called “persisted queries” which is the same kind of thing, but for your API. We’ve built two different tools in Apollo to make it easy to get started building with persisted…