You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm trying to implement persisted queries using apollo-client's format (within extensions). Right now, it's fairly difficult to get graphql-yoga and apollo-client to work with each other when using persisted queries:
graphql-yoga requires query to be defined or else it'll throw a 400 before we get to onParse.
Apollo's terminal HTTPLink really just can either send the printed query or nothing at all.
Describe the solution you'd like
It'd be nice to have some kind of hook to process the request after graphql-yoga has parsed it out (request body parsed to JSON, etc).
Describe alternatives you've considered
As things stand today, I can try either:
Sending an empty DocumentNode as the query if apollo is sending a persisted query.
Parsing the request myself, and setting query if a persisted query hash exists in the request before passing into yoga (this requires parsing query params or request body twice). Additional context
The text was updated successfully, but these errors were encountered:
As mentioned in #704 this is part of the future improvements we plan for Yoga.
Enhanced Plugin System that extends the base envelop plugin system and allows fully async parse/validate hooks + also hooking into beforeParseRequest/postParseRequest and preSendResponse/postSendResponse
Is your feature request related to a problem? Please describe.
I'm trying to implement persisted queries using
apollo-client
's format (within extensions). Right now, it's fairly difficult to getgraphql-yoga
andapollo-client
to work with each other when using persisted queries:graphql-yoga
requiresquery
to be defined or else it'll throw a 400 before we get toonParse
.Describe the solution you'd like
It'd be nice to have some kind of hook to process the request after
graphql-yoga
has parsed it out (request body parsed to JSON, etc).Describe alternatives you've considered
As things stand today, I can try either:
query
if apollo is sending a persisted query.Additional context
The text was updated successfully, but these errors were encountered: