apollographql / apollographql/federation
Persisted queries no longer compatible with CDN
- Dominant language
- TypeScript
- Stars
- 725
- Forks
- 276
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 1
Description
Problem package: apollo-gateway
Last worked with package: apollo-link-http
### Description
We are in the process of migrating from a schema stitching gateway with graphql-tools and apollo-server-lambda, to using apollo-gateway for federation support.
In our schema stitching gateway APQ caching with CDNs is supported between gateway and stitched service using GET requests. We are using AWS CloudFront as the CDN.
The same functionality is not supported using the provided RemoteGraphQLDataSource in apollo-gateway.
### The expected behaviour
When automatic persisted queries is enabled, the GraphQL data source should send a GET request to the federated service with the persisted query data encoded in the URL.
### The actual behaviour
All HTTP requests sent by RemoteGraphQLDataSource are POST and the persisted query data is not included in the URL, only the request body.
Contributor guide
Research direction
The affected entry point is RemoteGraphQLDataSource in apollo-gateway; start by tracing how it builds HTTP requests when automatic persisted queries are enabled. Compare the existing POST body behavior with the requested GET URL encoding for federated services, using the expected and actual behavior as the completion criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, graphql, typescript
- Domain
- api, backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100