How GraphQL Servers Break and How to Harden Your Resolvers – Kevin Dorosh & Sai Ekbote, GraphQL

Learn how to design and harden your GraphQL resolvers to ensure reliability and resilience, focusing on simplicity, flexibility, and error handling, and explore tools like JQ, Envoy, and Istio to achieve robust GraphQL server implementations.

Key takeaways
  • GraphQL resolvers should be designed to be simple, flexible, and resilient against service failures.
  • Avoid instrumenting resolvers with complex logic, instead focus on declarative configuration.
  • Use JQ for transforming upstream data into data recognized by GraphQL servers.
  • Outlier detection policies can be used to detect and remove unhealthy services from endpoint pools.
  • Declarative resolvers can be used to achieve a more streamlined configuration.
  • Circuit breaking and rate limiting can be used to prevent overwhelming of services.
  • GraphQL servers may need to be instrumented with error handling and retries.
  • GraphQL resolvers should be designed to handle errors, retries, and failures.
  • Use Envoy proxy and Istio for handling routing, circuit breaking, and rate limiting.
  • GraphQL servers should be instrumented with liveness probes and readiness probes.
  • JQ can be used for transforming data in real-time.
  • GraphQL resolvers should be designed to handle edge cases, such as timeouts and errors.
  • Use declarative resolvers for configuring resolvers.
  • GraphQL servers should be designed to handle errors and retries.
  • Outlier detection policies can be used to detect and remove unhealthy services from endpoint pools.
  • Use JQ for constructing data during runtime from GraphQL request.
  • GraphQL resolvers should be designed to handle complex routing, such as Envoy proxy and Istio.