graphql-client icon indicating copy to clipboard operation
graphql-client copied to clipboard

Extensions

Open tculshaw opened this issue 4 years ago • 1 comments

Hi,

First of all, awesome library - thankyou!!

I know this was opened on #89.

The extensions field IS part of the standard (albeit as an optional field), see https://github.com/graphql/graphql-spec/blob/main/spec/Section%207%20--%20Response.md , and (as #89 quoted) "would be easy to implement - maybe as an Option<serde_json::Value>". I think it DOES need to be an Option<serde_json::Value>

I'm trying to introduce a rate throttle on a Shopify Graphql based workflow which uses the extensions field to show associated costs of calls.

I'm trying to figure out the best way to do this with the existing code (may a trait on the Response?), but I'm a bit of a Rust newbie.

Or is there any plan to add this field directly any time soon?

Many Thanks,

Tony

tculshaw avatar May 27 '21 21:05 tculshaw

I think adding extensions to this type would be the way to go.

mathstuf avatar May 31 '21 01:05 mathstuf