💡 Enhance support of persisted Graphql queries
Recently support was added for persisted queries through this PR: https://github.com/DataDog/browser-sdk/pull/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 ?
Hey @valtechtmn, thanks for the feedback ! I created a ticket and I will let you know once it's merged
Hello @valtechtmn , I have just merged https://github.com/DataDog/browser-sdk/pull/4125. It will be available in the next release.