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

Field names that start with on_ will get a bad query #182

Open
lukepolo opened this issue Aug 13, 2024 · 2 comments
Open

Field names that start with on_ will get a bad query #182

lukepolo opened this issue Aug 13, 2024 · 2 comments

Comments

@lukepolo
Copy link

my schema has a on_demand field, but in the code it thinkts it should be fragment

  if (f.startsWith('on_')) {
                    ctx.fragmentCounter++
To query some fields only on a certain type you can use graphql fragments
In genql you can express the fragments for union and interface types using the on_ prefixed fields in a query

any work arounds?

Copy link

linear bot commented Aug 13, 2024

@lukepolo
Copy link
Author

for now i just changed it to is_on_demand, but i think we can detect thing, i can look in a bit

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

1 participant