engine icon indicating copy to clipboard operation
engine copied to clipboard

Relation operators none, some, every in GraphQL queries

Open matej21 opened this issue 2 years ago • 0 comments

Now it is not really convenient to write such queries (however possible in most cases by inverting the conditions using not), this syntax sugar would improve DX. the query could look like this:

listArticle(filter: {tags: {some: {name: {eq: "foo"}}}}) {
 ...
}

But there is an issue with back compatibility. Now, name is on the level of any field.

We have following possibilities:

  • opt-in change structure of queries (compatibility with interface??)
  • add operator only if not in collision (maybe add _ prefix)
  • any other ideas?

matej21 avatar Mar 24 '23 13:03 matej21