-
Notifications
You must be signed in to change notification settings - Fork 5
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
code generation support for filters #27
Comments
generic filters on immediate struct fields/map keys is demonstrated in https://github.com/graphql-go/graphql/blob/master/examples/httpdynamic/main.go#L75-L84 The part that becomes scary is if you allow filters on the full subdag you've realized for each type, because while possible it probably makes the schema/reflection/generation jump an order of time-complexity, since you're re-parsing the sub-dag schema at each point. |
Are you sure you're not describing features you might want from Selectors, rather than from the Schema codegen? There's a whole zone of the Selectors spec that's reserved for a "Conditional" system, which is able to peek down the tree. (Or is proposed to have that feature, anyway -- the current state of it is an outline, and there's no implementation that I'm aware of.) |
in the context of a graphql query, there is a defined type system called an 'input type' where you can provide the graphql client with the schema of how they're allowed to filter their queries against the dag. So for instance
is an example graphql query with a 'nested filter'. |
The current schema generation does not provide support for parsing incoming arguments or offering filtered views of lists based on matching fields within the dag of the items in the list.
This should be doable in a general way as part of codegen.
The text was updated successfully, but these errors were encountered: