mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-20 22:11:45 +03:00
41 lines
752 B
YAML
41 lines
752 B
YAML
description: Fetch data from locations table with distance from a point
|
|
url: /v1/graphql
|
|
status: 200
|
|
response:
|
|
data:
|
|
locations:
|
|
- location:
|
|
type: Point
|
|
crs:
|
|
type: name
|
|
properties:
|
|
name: urn:ogc:def:crs:EPSG::4326
|
|
coordinates:
|
|
- 0
|
|
- 0
|
|
distance: 0
|
|
- location:
|
|
type: Point
|
|
crs:
|
|
type: name
|
|
properties:
|
|
name: urn:ogc:def:crs:EPSG::4326
|
|
coordinates:
|
|
- 1
|
|
- 0
|
|
distance: 111319
|
|
query:
|
|
variables:
|
|
point:
|
|
type: Point
|
|
coordinates:
|
|
- 0
|
|
- 0
|
|
query: |
|
|
query ($point: json) {
|
|
locations{
|
|
location
|
|
distance(args: {from: $point})
|
|
}
|
|
}
|