-
Notifications
You must be signed in to change notification settings - Fork 7
/
schema.gql
108 lines (95 loc) · 2.02 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
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
# -----------------------------------------------
# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
# -----------------------------------------------
"""The Cart model"""
type Cart {
id: ID!
products: String!
product: Product!
}
input CartInput {
products: ID!
}
"""The Categories model"""
type Categories {
id: ID!
name: String!
description: String!
}
input CategoriesInput {
name: String!
description: String!
}
"""
The javascript `Date` as string. Type represents date and time as the ISO Date string.
"""
scalar DateTime
type Mutation {
createUser(data: UserInput!): User!
deleteUser(id: String!): Boolean!
createProduct(data: ProductInput!): Product!
deleteProduct(id: String!): Boolean!
createCategory(data: CategoriesInput!): Categories!
deleteCategory(id: String!): Boolean!
createCart(data: CartInput!): Cart!
deleteCart(id: String!): Boolean!
createOrder(data: OrderInput!): Order!
deleteOrder(id: String!): Boolean!
}
"""The Order model"""
type Order {
id: ID!
user_id: String!
payde: Boolean!
date: DateTime!
products: Product!
}
input OrderInput {
user_id: String!
payde: Boolean!
date: DateTime!
}
"""The Product model"""
type Product {
id: ID!
name: String!
description: String!
color: String!
stock: Int!
price: Int!
category_id: String!
category: Categories!
}
input ProductInput {
name: String!
description: String!
color: String!
stock: Float!
price: Float!
category_id: String!
}
type Query {
returnSingleUser(id: String!): User!
returnAllUsers: [User!]!
returnSingleProduct(id: String!): Order!
returnAllProduct: [Product!]!
returnSingleCategory(id: String!): Categories!
returnAllCategories: [Categories!]!
returnSingleCart(id: String!): Cart!
returnAllCart: [Cart!]!
returnAllOrder: [Order!]!
}
"""The User model"""
type User {
id: ID!
username: String!
email: String!
cart_id: String!
cart: Cart!
}
input UserInput {
username: String!
email: String!
cart_id: ID!
}