-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexampleQueries.graphql
57 lines (54 loc) · 1.43 KB
/
exampleQueries.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
mutation
{
populateCartoDataResources (
resources:[
{
type: "cartodb"
resourceHandle: "byServiceName"
url: "https://phl.carto.com/api/v2/sql"
q: "?q=SELECT service_name, COUNT(cartodb_id) FROM public_cases_fc WHERE service_name NOT IN ('Information Request') GROUP BY service_name ORDER BY count DESC"
}
],
dataFields: [
{
resourceHandle: "byServiceName"
field: "service_name"
type: "STRING"
},
{
resourceHandle: "byServiceName"
field: "count"
type: "INTEGER"
}
]
)
{
type
}
}
{
getComponents (
components: [
{
type: "Nvd3Chart", resourceHandle: "byServiceName", dataFields: [
{field: "service_name", resourceHandle: "byServiceName", fieldHandle: "x", type: "STRING"},
{field: "count", resourceHandle: "byServiceName", fieldHandle: "y", type: "INTEGER"},
],
where: "{\"count\": {\"$lte\": 10}}",
order: "[[\"count\",\"DESC\"]]"
}
]
)
{
type
data {
JSONResponse
total_rows
time
fields {
field
type
}
}
}
}