Skip to content

💡 Enhance support of persisted Graphql queries #4063

@valtechtmn

Description

@valtechtmn

Recently support was added for persisted queries through this PR:
#3992

However there is still a gap that affects anyone using useGETForHashedQueries as is recommended by Apollo's doc:
https://www.apollographql.com/docs/apollo-server/performance/apq#step-2-enable-automatic-persisted-queries

In this case any graphql query is a GET instead of a POST and the usual properties (operationName, variables, ...) are passed as query param instead of payload. This means the extractGraphQlRequestMetadata function which is only looking at request body misses the data and extracts nothing.

Would it be possible if the requestBody is empty to check the query params to see if the data is there and then proceed as normal ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions