Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensions of a response #65

Open
FlavDumi opened this issue Mar 2, 2022 · 1 comment
Open

Extensions of a response #65

FlavDumi opened this issue Mar 2, 2022 · 1 comment

Comments

@FlavDumi
Copy link

FlavDumi commented Mar 2, 2022

Can you make the GraphqlSuccessResponse have the extensions of a response? It only has the data so far.
In our case we need to read the extensions to know how much quota we still have available for the API.

image

@Zaid-Ajaj
Copy link
Owner

Hi there @FlavDumi, I understand the problem but the solution is not as straightforward I am afraid. Mainly because the shape of extensions is not part of the GraphQL schema (if I am not mistaken) so you would have to provide the shape in the configuration JSON like we do with the custom error type. Then we would have to extend the codegen module to also return Result<Query * ExtensionsType, ErrorType list> where ExtensionsType is the configured type from the JSON.

Is this something you would like to give a try and implement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants