This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
119 lines (106 loc) · 2.2 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
type Comment {
# A unique identifier for the comment.
commentId: String!
# The comment's content.
content: String!
# The comment timestamp. This field is indexed to enable sorted pagination.
createdAt: String!
# The id of the comment's parent event.
eventId: ID!
}
type CommentConnection {
items: [Comment]
nextToken: String
}
type Event {
# Paginate through all Event.comments belonging to an individual post.
comments(limit: Int, nextToken: String): CommentConnection
description: String
id: ID!
name: String
when: String
where: String
}
type EventConnection {
items: [Event]
nextToken: String
}
type Mutation {
# Comment on an event.
commentOnEvent(content: String!, createdAt: String!, eventId: ID!): Comment
# Create a single event.
createEvent(description: String!, name: String!, when: String!, where: String!): Event
# Delete a single event by id.
deleteEvent(id: ID!): Event
}
type Query {
# Get a single event by id.
getEvent(id: ID!): Event
# Paginate through events.
listEvents(filter: TableEventFilterInput, limit: Int, nextToken: String): EventConnection
}
type Subscription {
subscribeToEventComments(eventId: String!): Comment @aws_subscribe(mutations : ["commentOnEvent"])
}
input TableBooleanFilterInput {
eq: Boolean
ne: Boolean
}
input TableEventFilterInput {
description: TableStringFilterInput
id: TableIDFilterInput
name: TableStringFilterInput
when: TableStringFilterInput
where: TableStringFilterInput
}
input TableFloatFilterInput {
between: [Float]
contains: Float
eq: Float
ge: Float
gt: Float
le: Float
lt: Float
ne: Float
notContains: Float
}
input TableIDFilterInput {
beginsWith: ID
between: [ID]
contains: ID
eq: ID
ge: ID
gt: ID
le: ID
lt: ID
ne: ID
notContains: ID
}
input TableIntFilterInput {
between: [Int]
contains: Int
eq: Int
ge: Int
gt: Int
le: Int
lt: Int
ne: Int
notContains: Int
}
input TableStringFilterInput {
beginsWith: String
between: [String]
contains: String
eq: String
ge: String
gt: String
le: String
lt: String
ne: String
notContains: String
}