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
So, the GraphQL spec apparently includes an optional section in responses called "extensions". https://spec.graphql.org/October2021/#sec-Response-Format So some implementations may return important data outside the {"data": ...} field in a response. Specifically, Shopify responds with
to provide meta information on a request throttling scheme that Shopify uses.
Unfortunately I can see no easy way of getting this information when using ariadne-codegen to generate requests. A plugin can fix this by re-writing all the return values from generate_client_method, but would you all consider an optional return value for this extensions dictionary? (in a hacky plugin I have the generated client.py returning Tuple[MyShopifyResponseType, Optional[Dict[str, Any]]] on every function) Or perhaps some other mechanism for easy access to this data in responses?
Thanks for your time, and I love the library!
The text was updated successfully, but these errors were encountered:
So, the GraphQL spec apparently includes an optional section in responses called
"extensions"
. https://spec.graphql.org/October2021/#sec-Response-Format So some implementations may return important data outside the{"data": ...}
field in a response. Specifically, Shopify responds withto provide meta information on a request throttling scheme that Shopify uses.
Unfortunately I can see no easy way of getting this information when using ariadne-codegen to generate requests. A plugin can fix this by re-writing all the return values from
generate_client_method
, but would you all consider an optional return value for thisextensions
dictionary? (in a hacky plugin I have the generatedclient.py
returningTuple[MyShopifyResponseType, Optional[Dict[str, Any]]]
on every function) Or perhaps some other mechanism for easy access to this data in responses?Thanks for your time, and I love the library!
The text was updated successfully, but these errors were encountered: