-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtest_queries.graphql
86 lines (77 loc) · 1.06 KB
/
test_queries.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
mutation CreatePlace {
createPlace(input: {
lat: -25.363,
lng: 131.044,
name: "House in Australia",
price: 100.25
}) {
name
price
lat
lng
}
}
query {
searchPlaceByLatLng(lat: -25.363, lng: 130.044) {
name
price
lat
lng
}
}
query {
searchPlaceByName(name: "House") {
name
price
lat
lng
}
}
subscription OnCreateTodoSubscription {
onCreateTodo {
__typename
id
title
status
}
}
PUT /places
{
"mappings": {
"_doc": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
}
PUT /places/_doc/123
{
"name": "hello world",
"price": 1,
"location": {
"lat": 41.12,
"lon": -71.34
}
}
GET /places/_search
{
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": {
"geo_distance": {
"distance": "200km",
"location": {
"lat": 41.12,
"lon": -71.34
}
}
}
}
}
}