-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.graphql
More file actions
150 lines (130 loc) · 2.32 KB
/
schema.graphql
File metadata and controls
150 lines (130 loc) · 2.32 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
### This file was generated by Nexus Schema
### Do not make changes to this file directly
type AuthPayload {
token: String
user: User
}
"""
A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.
"""
scalar DateTime
type Fish {
bait: String!
catchTime: DateTime!
createdAt: DateTime!
id: Int!
image: String
length: Int!
type: FishType!
updatedAt: DateTime!
user: User
userId: Int!
uuid: String!
water: Water
weather: Weather
weight: Int!
}
input FishCreateInput {
bait: String!
catchTime: DateTime!
length: Int!
type: FishType!
water: WaterCreateInput!
weather: WeatherCreateInput!
weight: Int!
}
input FishGetInput {
uuid: String!
}
"""The supported fish types"""
enum FishType {
CARP
PERCH
PIKE
WHITE_AMUR
}
"""Enum for all moon phases"""
enum MoonType {
FIRST_QUARTER
FULL_MOON
NEW_MOON
THIRD_QUARTER
WANING_CRESCENT
WANING_GIBBOUS
WAXING_CRESCENT
WAXING_GIBBOUS
}
type Mutation {
createFish(data: FishCreateInput!, image: Upload): Fish
login(email: String!, password: String!): AuthPayload
signup(email: String!, name: String, password: String!): AuthPayload
}
type Query {
fish(data: FishGetInput!): Fish
fishes: [Fish!]
me: User
}
enum SortOrder {
asc
desc
}
"""The `Upload` scalar type represents a file upload."""
scalar Upload
type User {
email: String!
fishes: [Fish!]!
id: Int
name: String
uuid: String
}
input UserCreateInput {
email: String!
name: String
}
input UserUniqueInput {
email: String
uuid: String
}
type Water {
createdAt: DateTime!
fishId: Int!
id: Int!
location: String!
number: String!
updatedAt: DateTime!
uuid: String!
}
input WaterCreateInput {
location: String!
number: String!
}
type Weather {
createdAt: DateTime!
fishId: Int!
id: Int!
moon: MoonType!
pressure: Int!
temperature: Int!
updatedAt: DateTime!
uuid: String!
windDirection: WindDirection!
windForce: Int!
}
input WeatherCreateInput {
moon: MoonType!
pressure: Int!
temperature: Int!
windDirection: WindDirection!
windForce: Int!
}
"""Enum for all wind directions"""
enum WindDirection {
E
N
NE
NW
S
SE
SW
W
}