docs: example graphql query dynamic zone

Following the issue #4849 - I add an example about the query to do to fetch DZ data.
This commit is contained in:
Jim LAURIE 2020-01-08 15:23:09 +01:00
parent f1e7288db7
commit acf4c1dece

View File

@ -91,6 +91,23 @@ query {
}
```
### Fetch dynamic zone data
Dynamic zones are union types in graphql so you need to use fragments to query the fields.
```
query {
restaurants {
dz {
__typename
... on ComponentDefaultClosingperiod {
label
}
}
}
}
```
### Create a new entry
- `input`: Object