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

Version 5 lost the auto detection of the variables types #394

Open
Nico924 opened this issue Mar 29, 2024 · 2 comments
Open

Version 5 lost the auto detection of the variables types #394

Nico924 opened this issue Mar 29, 2024 · 2 comments

Comments

@Nico924
Copy link

Nico924 commented Mar 29, 2024

I am using grapql-zeus since a long time now but sticked to version 4 because with version 4 I was not obligated to put the variable type with the $ operator.
Now with version 5 I see that we have to put the variable type as well like this :
Zeus('query', { myFunc: [{ input: $('input','InputType!) }, outputModel ] })

With version 4 I was able to do :
Zeus('query', { myFunc: [{ input: $('input') }, outputModel ] })

And InputType! was automatically detected.

Is it intended ? Is there a workaround ?

Thank you in advance for you answer

@Nico924 Nico924 changed the title Version 5 lost the auto detection of the variable types Version 5 lost the auto detection of the variables types Mar 29, 2024
@aexol
Copy link
Collaborator

aexol commented Apr 4, 2024

This is intended as I don't have time to reimplement those. Right now the best way to use zeus is to use typedDocumentNode output with some other lib like apollo. Then it works great with variables. My idea is to write a simple fetch client that consumes typeddocumentnode some day

@heliosam
Copy link

heliosam commented Apr 4, 2024

Adding to what @aexol mentioned, I've been using typedDocumentNode for the last weeks in tandem with urql and so far it's worked great for that matter, in fact it is very straightforward and very little (or zero even) extra code.

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

3 participants