-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.gql
58 lines (48 loc) · 1.05 KB
/
schema.gql
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
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
input CreateCupcakeResource {
ingredients: [CreateIngredientResource!]!
name: String!
stock: Float
}
input CreateIngredientResource {
name: String!
}
input CreateRatingResource {
comment: String!
createdAt: DateTime = "2022-08-04T14:35:19.083Z"
cupcakeId: String!
rating: Float!
}
type Cupcake {
id: String!
ingredients: [Ingredient!]!
name: String!
stock: Float
}
"""
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
"""
scalar DateTime
type Ingredient {
id: String!
name: String!
}
type Mutation {
createCupcake(cupcake: CreateCupcakeResource!): Cupcake!
createRating(rating: CreateRatingResource!): Rating!
}
type Query {
cupcake(id: Int!): Cupcake!
cupcakes: [Cupcake!]!
}
type Rating {
comment: String!
createdAt: DateTime!
id: String!
rating: Float!
}
type Subscription {
ratingAdded: Rating!
}