Update overview.mdx

This commit is contained in:
philipgher
2023-02-23 22:01:55 +01:00
committed by GitHub
parent d0abf19037
commit ee06515ca9

View File

@@ -105,6 +105,18 @@ const query = {
Written in plain English, if the above query were passed to a `find` operation, it would translate to finding posts where either the `color` is `mint` OR the `color` is `white` AND `featured` is set to false.
### Nested properties
When working with nested properties, which can happen when using relational fields, it is possible to use the dot notation to access the nested property. For example, when working with a `Song` collection that has a `artists` field which is related to an `Artists` collection using the `name: 'artists'`. You can access a property within the collection `Artists` like so:
```js
const query = {
'artists.featured': { // nested property name to filter on
exists: true, // operator to use and boolean value that needs to be true
},
}
```
### GraphQL Find Queries
All GraphQL `find` queries support the `where` argument, which accepts queries exactly as detailed above.