-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathschema.gql
81 lines (70 loc) · 1.72 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
# -----------------------------------------------
# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
# -----------------------------------------------
input CreateProductInput {
description: String!
name: String!
price: Float!
}
"""
A field whose value conforms to the standard internet email address format as specified in RFC822: https://www.w3.org/Protocols/rfc822/.
"""
scalar EmailAddress @specifiedBy(url: "https://www.w3.org/Protocols/rfc822/")
input GetProductInput {
productId: String!
}
type Mutation {
createProduct(input: CreateProductInput!): Product!
deleteProduct(id: String!): Product!
updateUser(input: UpdateUserInput!): User!
}
"""
A field whose value conforms with the standard mongodb object ID as described here: https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId. Example: 5e5677d71bdc2ae76344968c
"""
scalar ObjectID
input PaginatedInputOptions {
lean: Boolean = true
limit: Float = 10
offset: Float = 0
page: Float = 1
pagination: Boolean = true
populate: String
select: String
sort: String
}
type PaginatedProducts {
docs: [Product!]!
hasNextPage: Boolean!
hasPrevPage: Boolean!
limit: Float!
nextPage: Float
page: Float!
pagingCounter: Float!
prevPage: Float
totalDocs: Float!
totalPages: Float!
}
type Product {
_id: ObjectID!
description: String!
name: String!
price: String!
productId: String!
user: User!
}
type Query {
me: User
product(input: GetProductInput!): Product
products(pagination: PaginatedInputOptions): PaginatedProducts!
}
input UpdateUserInput {
email: EmailAddress!
name: String
}
type User {
_id: ObjectID!
email: EmailAddress!
name: String
roles: [String!]!
}