neo4j / docs-graphql

GraphQL docs
5 stars 9 forks source link

[Docs] Add Logical Operators to the Filtering Documentation #108

Closed PascalStehling closed 6 months ago

PascalStehling commented 2 years ago

Is your feature request related to a problem? Please describe. Nowhere in the documentation is described how to work with logical operators (OR, AND), although it is implemented and works.

Describe the solution you'd like The documentation for filtering should be extended by an example with OR or AND to make it easier for beginners.

For example, the following text could be inserted:

Filtering with logical operators
By using the OR or AND argument with a list of different filters, they can be logically related to each other. In the following example the User and 2 Posts can by retrieved by ID.

query {
    users {
        id
        name
        posts(where: {OR: [{ id: "2D297425-9BCF-4986-817F-F06EE0A1D9C7" }, { id: "SOME-OTHER-ID" }]}) {
            content
        }
    }
}
mjfwebb commented 7 months ago

Let's rename https://neo4j.com/docs/graphql/5/queries-aggregations/filtering/#_combining_operators to logical operators and then we can consider this done

rsill-neo4j commented 6 months ago

it's live: https://neo4j.com/docs/graphql/5/queries-aggregations/filtering/#_logical_operators