Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TomHAnderson committed Sep 2, 2023
1 parent 10d6f02 commit f6833ed
Showing 1 changed file with 44 additions and 44 deletions.
88 changes: 44 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,50 @@ $result = GraphQL::executeQuery(
$output = $result->toArray();
```

Filtering
---------

For every attributed field and every attributed association, filters are available in your
GraphQL query.

Example

```gql
{
artists ( filter: { name: { contains: "dead" } } ) {
edges {
node {
id
name
performances ( filter: { venue: { eq: "The Fillmore" } } ) {
edges {
node {
venue
}
}
}
}
}
}
}
```

Each field has their own set of filters. Most fields have the following:

* eq - Equals.
* neq - Not equals.
* lt - Less than.
* lte - Less than or equal to.
* gt - Greater than.
* gte - Greater than or equal to.
* isnull - Is null. If value is true, the field must be null. If value is false, the field must not be null.
* between - Between. Identical to using gte & lte on the same field. Give values as `low, high`.
* in - Exists within a list of comma-delimited values.
* notin - Does not exist within a list of comma-delimited values.
* startwith - A like query with a wildcard on the right side of the value.
* endswith - A like query with a wildcard on the left side of the value.
* contains - A like query.


Events
------
Expand Down Expand Up @@ -309,50 +353,6 @@ $driver->get(EventDispatcher::class)->subscribeTo(
);
```

Filtering
---------

For every attributed field and every attributed association, filters are available in your
GraphQL query.

Example

```gql
{
artists ( filter: { name: { contains: "dead" } } ) {
edges {
node {
id
name
performances ( filter: { venue: { eq: "The Fillmore" } } ) {
edges {
node {
venue
}
}
}
}
}
}
}
```

Each field has their on set of filters. Most fields have the following:

* eq - Equals
* neq - Not equals
* lt - Less than
* lte - Less than or equal to
* gt - Greater than
* gte - Greater than or equal to
* isnull - Is null. If value is true, the field must be null. If value is false, the field must not be null.
* between - Between. Identical to using gte & lte on the same field. Give values as `low,high`
* in - Exists within a list of comma-delimited values.
* notin - Does not exist within a list of comma-delimited values.
* startwith - A like query with a wildcard on the right side of the value.
* endswith - A like query with a wildcard on the left side of the value.
* contains - A like query.


Further Reading
---------------
Expand Down

0 comments on commit f6833ed

Please sign in to comment.