Skip to content
New issue

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

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

Already on GitHub? # to your account

Add generics for Variables? #177

Closed
dotansimha opened this issue Jul 15, 2020 · 3 comments · Fixed by #143
Closed

Add generics for Variables? #177

dotansimha opened this issue Jul 15, 2020 · 3 comments · Fixed by #143

Comments

@dotansimha
Copy link

It's defined as export type Variables = { [key: string]: any } right now, which doesn't make any sense, because variables could be typed and it should be supported.

@pavanagrawal123
Copy link

pavanagrawal123 commented Jul 19, 2020

When using with something like graphql-codegen, this becomes a pain to run into, since graphql-codegen will generate out a variable object for us to use. I can open a PR to fix this if wanted, but it looks like Prisma doesn't seem to support this project too much anymore?
edit: #143 takes care of this, but no activity on it since 2019...

@dotansimha
Copy link
Author

Thanks @pavanagrawal123 !
Actually, GraphQL Codegen plugin for graphql-request wraps the calls with a custom function, and applies Variables on the wrapping level, so it will be typed anyway.

And yeah, it seems like this library is no longer maintained...

@pavanagrawal123
Copy link

@dotansimha , ahh I see, it looks like I might be using it wrong then haha.

Great work on the library, thank you for making it amazing :)

jasonkuhrt added a commit that referenced this issue Aug 3, 2020
closes #177

Co-authored-by: Jason Kuhrt <jasonkuhrt@me.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants