Docs
Launch GraphOS Studio

Production readiness checklist

serversreclient

We recommend that you complete this checklist before your supergraph begins handling production traffic from clients.

In Apollo Studio

Server-side

  • For security, disable introspection for all production GraphQL servers.
    • You can continue to view and fetch your GraphQL schemas from Apollo Studio.
  • Ensure that you've correctly configured managed federation.
  • Ensure that you've integrated rover subgraph check and rover subgraph publish into your CI/CD pipeline.
  • If your subgraph servers are listed as compatible with FEDERATED TRACING, ensure that you've enabled federated traces, and that you can view operation metrics as expected in Apollo Studio.
  • Consider adding caching layers.
  • Ensure that you've load-tested your graph.
    • Test loads should be representative of your current traffic (both in terms of volume and in terms of the actual operations you execute in the test).
    • To investigate performance issues, use Apollo Studio to identify which operations are performing slowly.
      • Look at resolver execution times to identify slow areas of execution.
      • Whenever possible, avoid making multiple calls to data sources within a single resolver.
      • Understand query plan execution to help understand slow operations and optimize your supergraph to avoid them.

Apollo Gateway APQ example

This example uses both the buildService option and the RemoteGraphQLDataSource class to enable APQ to each subgraph.

import {ApolloServer} from '@apollo/server';
import {startStandaloneServer} from '@apollo/server/standalone';
import {ApolloGateway, RemoteGraphQLDataSource} from '@apollo/gateway';
import {readFileSync} from 'fs';
const gateway = new ApolloGateway({
supergraphSdl: readFileSync('./supergraph.graphql').toString(),
buildService: ({url}) => {
return new RemoteGraphQLDataSource({url, apq: true});
}
});
const server = new ApolloServer({
gateway
});
// Note the top-level await!
const {url} = await startStandaloneServer(server);
console.log(`🚀 Server ready at ${url}`);
Next
Home
Edit on GitHubEditForumsDiscord