-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
117 lines (102 loc) · 1.81 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# this is purely a schema, no queries or mutations
type Brand {
brandId: ID!
name: String!
website: String
icon: Image!
shoes: [Shoe] @hasInverse(field: brand)
}
type Collection {
collectionId: ID!
name: String!
shoes: [Shoe] @hasInverse(field: collection)
}
type Colour {
colourId: ID!
shoe: Shoe!
name: String!
hex: String!
image: Image!
}
type Customer {
customerId: String! @id
email: String! @id
name: String!
picture: String
orders: [Order] @hasInverse(field: customer)
reviews: [Review] @hasInverse(field: customer)
wishlist: [WishList] @hasInverse(field: customer)
}
type Image {
imageId: ID!
name: String!
}
type Order {
orderId: ID!
customer: Customer!
dateOfPurchase: DateTime
paid: Boolean!
total: Int
deliveryAddress: String
activeCart: Boolean! @search
items: [OrderItem] @hasInverse(field: order)
}
type OrderItem {
orderItemId: ID!
order: Order!
shoe: Shoe!
stock: Stock!
quantity: Int!
price: Int
}
type Review {
reviewId: ID!
shoe: Shoe!
customer: Customer!
stars: Int!
message: String
timestamp: DateTime!
}
type Section {
sectionId: ID!
name: String!
}
type Shoe {
shoeId: ID!
name: String!
description: String!
price: Int!
releaseDate: DateTime!
stars: Int
public: Boolean! @search
brand: Brand!
style: Style!
section: Section!
collection: Collection!
coverImage: Image!
colours: [Colour] @hasInverse(field: shoe)
tags: [Tag] @hasInverse(field: shoe)
reviews: [Review] @hasInverse(field: shoe)
stock: [Stock] @hasInverse(field: shoe)
}
type Stock {
stockId: ID!
shoe: Shoe!
colour: Colour!
size: Int!
quantity: Int!
}
type Style {
styleId: ID!
name: String!
}
type Tag {
tagId: ID!
shoe: Shoe!
tag: String!
}
type WishList {
wishListId: ID!
customer: Customer!
shoe: Shoe!
}