-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy pathschema.graphql
102 lines (80 loc) · 1.74 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
"""
Use to check whether or not a user is authenticated and is associated
with an optional set of roles.
"""
directive @requireAuth(roles: [String]) on FIELD_DEFINITION
"""Use to skip authentication checks and allow public access."""
directive @skipAuth on FIELD_DEFINITION
scalar BigInt
scalar Date
scalar DateTime
type Fruit implements Grocery {
id: ID!
"""Seedless is only for fruits"""
isSeedless: Boolean
name: String!
nutrients: String
price: Int!
quantity: Int!
region: String!
"""Ripeness is only for fruits"""
ripenessIndicators: String
stall: Stall!
}
union Groceries = Fruit | Vegetable
interface Grocery {
id: ID!
name: String!
nutrients: String
price: Int!
quantity: Int!
region: String!
stall: Stall!
}
scalar JSON
scalar JSONObject
"""About the Redwood queries."""
type Query {
fruitById(id: ID!): Fruit
fruits: [Fruit!]!
groceries: [Groceries!]!
"""Fetches the Redwood root schema."""
redwood: Redwood
stallById(id: ID!): Stall
stalls: [Stall!]!
vegetableById(id: ID!): Vegetable
vegetables: [Vegetable!]!
}
"""
The RedwoodJS Root Schema
Defines details about RedwoodJS such as the current user and version information.
"""
type Redwood {
"""The current user."""
currentUser: JSON
"""The version of Prisma."""
prismaVersion: String
"""The version of Redwood."""
version: String
}
type Stall {
fruits: [Fruit]
id: ID!
name: String!
stallNumber: String!
vegetables: [Vegetable]
}
scalar Time
type Vegetable implements Grocery {
id: ID!
"""Pickled is only for vegetables"""
isPickled: Boolean
name: String!
nutrients: String
price: Int!
quantity: Int!
region: String!
stall: Stall!
"""Veggie Family is only for vegetables"""
vegetableFamily: String
}