Skip to content
Snippets Groups Projects
Commit e704ea4b authored by Calisto, Luis's avatar Calisto, Luis
Browse files

Merge branch 'diana' into 'main'

added example GraphQL Query for retrieving the values of a property within a polygon

See merge request !6
parents dcc08e27 0bc55f6f
Branches main
No related tags found
1 merge request!6added example GraphQL Query for retrieving the values of a property within a polygon
......@@ -1268,3 +1268,65 @@ query MyQuery {
```
Note that in the above example the API only returns 4 results because we dont have more in the dataset.
## Get the values of a property within a polygon
```graphql
query MyQuery($first: Int, $offset: Int) {
wosisLatestProfiles(
filter: {
layers: { some: { sandValuesExist: true } }
geom: {
within: {
type: "Polygon"
coordinates: [
[
[-5.51345387228184, 9.59126476678042]
[-5.51345387228184, 11.0451128553676]
[-3.45410758209379, 11.0451128553676]
[-3.45410758209379, 9.59126476678042]
[-5.51345387228184, 9.59126476678042]
]
]
}
}
and: {
continent: { likeInsensitive: "Africa" }
countryName: { likeInsensitive: "burkina faso" }
}
}
first: $first
offset: $offset
) {
latitude
longitude
layers(first: $first, filter: { sandValuesExist: true }, offset: $offset) {
sandValues(first: 6) {
profileId
profileCode
layerId
datasetId
continent
region
countryName
date
upperDepth
lowerDepth
valueAvg
licence
methodOptions
}
}
}
}
```
Variables:
```json
{
"first": 10,
"offset": 0
}
``````
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment