-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
It seems like there is a huge advantage to sticking to the GraphQL spec where possible, in order to reduce the amount of mapping required by GraphQL clients talking to dgraph. A number of current
query features could be implemented to the spec without a worse DX.
Firstly, avoid function call style filters and queries in favour of a more declarative approach:
me(query:{name_anyof:"something"}) {}
// instead of
me(func:anyof(name, "something")){}
And
me(query:{type_eq: "foo"}, filter:{name_eq:"something"}){}
// instead of
me(func:eq(type, "foo") @filter(eq(name, "something"){}
Obviously this needs some careful thought to find the right balance, but being able to leverage a larger part of the GraphQL ecosystem seems like a huge win.
More ideas here:
https://www.graph.cool/docs/tutorials/designing-powerful-apis-with-graphql-query-parameters-aing7uech3/
Metadata
Metadata
Assignees
Labels
No labels