-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
https://www.apollographql.com/docs/apollo-server/performance/apq/
APQ relies on extensions
in the query body(POST) or query(GET) to enabled persisted queries. After some digging I realized: we use express-graphql
to parse the request https://github.com/ef-eng/express-graphql-query-rewriter/blob/master/src/index.ts#L69. which swallows the extensions
key in the request body.
consumers could parse the body before express-graphql-query-rewriter gets it bu the downside of this is:
- Query stored in APQ cache will be the rewritten one and not what the consumer actually passed.
- Adding or modifying a rewriter won't have any impact because the query will be cached already in the APQ cache.
I'm wondering if we can leverage apollo's request pipeline for this: https://www.apollographql.com/docs/apollo-server/integrations/plugins/#apollo-server-event-reference
Metadata
Metadata
Assignees
Labels
No labels