-
Notifications
You must be signed in to change notification settings - Fork 5
/
schema.graphql
59 lines (50 loc) · 1.12 KB
/
schema.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
type Mutation {
createPlace(input: CreatePlaceInput!): Place
# deletePlace(input: DeletePlaceInput!): Place
# updatePlace(input: UpdatePlaceInput!): Place
}
type Query {
searchPlaceByName(name: String!): [Place]!
searchPlaceByLatLng(lat:Float!, lng:Float!): [Place]!
}
type Subscription {
onCreatePlace(lat: Float, lng: Float, name: String, price: Float): Place
@aws_subscribe(mutations:["createPlace"])
# onDeletePlace(id: ID, lat: Float, lng: Float, name: String, price: Float): Place
# @aws_subscribe(mutations:["deletePlace"])
# onUpdatePlace(id: ID, lat: Float, lng: Float, name: String, price: Float): Place
# @aws_subscribe(mutations:["updatePlace"])
}
type Place {
name: String!
price: Float!
lat: Float!
lng: Float!
}
type PlaceOutput {
name: String!
price: Float!
lat: Float!
lng: Float!
}
input CreatePlaceInput {
name: String!
price: Float!
lat: Float!
lng: Float!
}
input DeletePlaceInput {
id: ID!
}
input UpdatePlaceInput {
id: ID!
name: String
price: Float
lat: Float
lng: Float
}
schema {
query: Query
mutation: Mutation
subscription: Subscription
}