Khan / genqlient

a truly type-safe Go GraphQL client
MIT License
1.02k stars 99 forks source link

Does the genqlient support extensions on requests? #306

Closed femtoeu closed 5 months ago

femtoeu commented 5 months ago

Hello,

I am using the genqlient package and I have a question regarding its capabilities. Specifically, I am trying to interact with a GraphQL server that uses the persisted-queries extension. I would like to know if there is a way to execute these types of requests using the genqlient package.

benjaminjkraft commented 5 months ago

Yep: https://github.com/Khan/genqlient/blob/28aafc79a9f9065f7cb7e8bb2df49e5795896aeb/docs/genqlient.yaml#L89. You can also mess with extensions in your graphql.Client, which may be more useful depending on your use case. Feel free to open an issue with more details if that doesn't work for your use case (or a PR to the docs with more details if it does :-) ).