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

Index graphql field inputs #57

Open
petterik opened this issue Dec 21, 2018 · 2 comments
Open

Index graphql field inputs #57

petterik opened this issue Dec 21, 2018 · 2 comments

Comments

@petterik
Copy link
Owner

As fields can have inputs, we need to index those fields somehow.

The first idea is to have:

[Query [^User ^Many users]
 Query.Input [field name type cardinality required?]]

Multiple Query.Input can point to the same field.

@petterik
Copy link
Owner Author

petterik commented Dec 21, 2018

When returning query results, there should be one query entity per set of inputs.

So a Query type should also have an inputs field:

[Query [^Query.Input ^many -inputs]]

Added one dash to signal that it's an internal field and so that it doesn't collide with other fields. Not using underscore, as it means something else in datascript (reverse lookup) and I've seen graphql API's using double underscores for internal stuff, e.g. __schema __type

@petterik
Copy link
Owner Author

This means that all queries that have no inputs will go on the same Query entity.

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