-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.gql
More file actions
80 lines (69 loc) · 1.41 KB
/
schema.gql
File metadata and controls
80 lines (69 loc) · 1.41 KB
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
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
type PackageModel {
id: ID!
createdAt: DateTime!
updatedAt: DateTime!
name: String!
description: String!
license: String!
homepage: String!
popularity: Float!
author: UserModel!
versions: [VersionModel!]!
}
"""
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
"""
scalar DateTime
type VersionModel {
id: ID!
createdAt: DateTime!
updatedAt: DateTime!
version: String!
arch: ArchType!
popularity: Float!
}
enum ArchType {
intel
silicon
}
type UserModel {
id: ID!
createdAt: DateTime!
updatedAt: DateTime!
username: String!
email: String!
role: Role!
packages: [PackageModel!]!
}
enum Role {
admin
trusted_user
user
}
type Query {
user(id: ID!): UserModel!
me: UserModel!
}
type Mutation {
createUser(data: UserCreateInput!): UserModel!
updateUser(data: UserUpdateInput!, id: ID!): UserModel!
updateMe(data: UserUpdateInput!): UserModel!
deleteUser(id: ID!): UserModel!
changePassword(data: UserUpdatePasswordInput!): UserModel!
}
input UserCreateInput {
username: String!
email: String!
password: String!
}
input UserUpdateInput {
username: String
email: String
}
input UserUpdatePasswordInput {
oldPassword: String!
newPassword: String!
}