Graphql
challenges
-
monitoring
- partial successes
- no easy error code like HTTP -> track #of exceptions
-
Query complexity (can have pathologically nested queries)
- only allow cached queries (persisted queries)
- calculate complexity score
- calculate query depth
-
caching complexity
- Data loader
- client side caching
GraphQL @ Twitter
-
GraphQL 2017 summit notes on GraphQL @ Twitter
- authN handled by a layer before GraphQL. authZ handled by lower-level services. the GraphQL API itself no auth responsibility
- implementing subscriptions with existing internal event bus
- Strato: internal tech. a virtual database, aka federated database, brings together multiple data sources so they can be queried and mutated uniformly
@Netflix (Private)
GraphQL Federationnotes from 11/23/2020
- How Netflix Scales its API with GraphQL Federation (Part 1)
- why graphQL:
- disparate teams building single-use aggregation layers
- teams building materialized views - data consistency issue
- why federation:
- Bottleneck of the centralized graph API team - disconnected from the domain expertise and the product needs
- Studio API federated GraphQL example
- new schema
- architecture
- Query planning and execution
- detailed query plan
- architecture evolution