-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogenSchema.gql
148 lines (132 loc) · 3.16 KB
/
autogenSchema.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
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
# -----------------------------------------------
# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
# -----------------------------------------------
type Building {
id: ID!
name: String
street_address: String!
city: String!
state: String!
country: String!
zip_code: String!
type: String!
outside_accessible: Boolean!
gender: String
longitude: Float!
latitude: Float!
orders: [Order!]
}
type Crate {
id: ID!
product: Product!
quantity: Float!
default_average_price: Float!
average_price: Float
}
input CreateBuildingInput {
name: String!
street_address: String!
city: String!
state: String!
country: String!
zip_code: String!
type: String!
outside_accessible: Boolean!
gender: String
latitude: Float!
longitude: Float!
}
input CreateHomeInput {
street_address: String!
city: String!
state: String!
country: String!
zip_code: String!
}
input CreateOrderInput {
crate: String!
quantity: Float!
user_location: String!
}
input CreateProductInput {
name: String!
description: String!
default_average_price: Float!
}
"""
The javascript `Date` as string. Type represents date and time as the ISO Date string.
"""
scalar DateTime
type Mutation {
createUserLocation(building_id: String!, room_number: String!, personal_name: String!): String
createHomeUserLocation(personal_name: String!, home_data: CreateHomeInput!): String
deleteUserLocation(user_location_id: String!): Boolean!
deleteUserHome(user_location_id: String!): Boolean!
createBuilding(data: CreateBuildingInput!): String
registerUser(data: RegisterUserInput!): String!
placeOrder(data: CreateOrderInput!): String!
createProduct(data: CreateProductInput!): String
deleteProduct(product_id: String!): Boolean!
createCrate(default_average_price: Float!, quantity: Float!, product_id: String!): String
deleteCrate(id: String!): Boolean!
}
type Name {
familyName: String!
givenName: String!
}
input NameInput {
familyName: String!
givenName: String!
}
type Order {
id: ID!
user: User!
user_location: UserLocation!
crate: Crate!
quantity: Float!
charge: Float!
date_created: DateTime!
}
type Product {
id: ID!
name: String!
description: String!
image_url: String
default_average_price: Float!
average_price: Float
crates: [Crate!]
}
type Query {
me: User
getXNearestBuildingsByLocation(x: Float!, radius: Float!, longitude: Float!, latitude: Float!): [Building!]
getXNearestBuildingsByBuilding(x: Float!, radius: Float!, building_id: String!): [Building!]
login(password: String!, username: String!): String
getMyOrders: [Order!]
getOrderById(id: String!): Order
getOrdersByBuilding(building_id: String!): [Order!]
getProductById(id: String!): Product
getAllProducts: [Product!]
getCrate(id: String!): Crate
}
input RegisterUserInput {
name: NameInput!
email: String!
confirm_email: String!
username: String!
password: String!
}
type User {
id: ID!
name: Name!
email: String!
username: String!
locations: [UserLocation!]
}
type UserLocation {
id: ID!
personal_name: String!
room_number: String
building: Building!
user: User!
}