-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathschema-generated.gql
119 lines (102 loc) · 1.97 KB
/
schema-generated.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
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
type User {
id: ID!
email: String!
firstName: String
lastName: String
roles: [Roles!]
orders: [Order!]
}
"""User role for permissions"""
enum Roles {
USER
ADMIN
GUEST
}
type Order {
id: ID!
user: User!
item: Item!
userId: String!
itemId: String!
quantity: Float!
}
type Item {
id: ID!
title: String!
price: Float!
description: String!
orders: [Order!]
}
type Metadata {
count: Float
}
type Token {
accessToken: String!
}
type File {
url: ID!
success: Boolean!
}
type Query {
allUsers: [User!]!
User(id: String!): User!
allOrders: [Order!]!
Order(id: String!): Order!
allItems: [Item!]!
Item(id: String!): Item!
allItemsMeta: Metadata!
}
type Mutation {
updateUser(input: UpdateUserInput!, id: String!): User!
deleteUser(id: String!): User!
createOrder(input: OrderInput!): Order!
updateOrder(input: UpdateOrderInput!, id: String!): Order!
deleteOrder(id: String!): Order!
createItem(input: ItemInput!): Item!
updateItem(input: UpdateItemInput!, id: String!): Item!
deleteItem(id: String!): Item!
login(input: Login!): Token!
signUp(input: UserInput!): User!
uploadFile(file: Upload!): File!
removeFile(fileUrl: String!): Boolean!
}
input UpdateUserInput {
email: String
password: String
firstName: String
lastName: String
}
input OrderInput {
itemId: String!
userId: String!
quantity: Float!
}
input UpdateOrderInput {
itemId: String
quantity: Float
}
input ItemInput {
title: String!
price: Float!
description: String!
}
input UpdateItemInput {
title: String
price: Float
description: String
}
input Login {
email: String!
password: String!
}
input UserInput {
email: String!
password: String!
firstName: String
lastName: String
}
"""The `Upload` scalar type represents a file upload."""
scalar Upload