-
Notifications
You must be signed in to change notification settings - Fork 112
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
Allow __all to request all fields #27
Comments
Another issue to think about here is it's not obvious what type Query { a: A }
type A { b: B }
type B { a: A }
query { a { __all } } We can't expand all fields recursively, because it would go on forever! Do we just never expand non-leaf fields? Do we expand everything we can do without circular references? |
@benjaminjkraft That will be a really nice feature. There is a case in generating all the fields with |
Also, you will need to implement a way to control the depth of the fields. Otherwise, this can end up in an endless loop for the reversed fields. |
Ah, querying a database where you want to |
I wrote a quick POC on One question about depth is: is it going to be enough? What if you want to fetch, say, all leaf fields plus |
I think it would be better to start by supporting only |
A fun thing we can do, because we generate code, is to allow you to put in a pseudo-field like
__all
, which we expand to all the fields. That's probably a terrible idea, both in that it diverges from the spec, and you shouldn't want to do that, but we could do it anyway! And it would be useful especially for tests.The text was updated successfully, but these errors were encountered: