-
Notifications
You must be signed in to change notification settings - Fork 422
/
admin_schema.gql
53 lines (48 loc) · 1.18 KB
/
admin_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
schema{
query: AdminQuery,
mutation: AdminMutation
}
directive @protected on FIELD_DEFINITION | OBJECT
"""
Contains all admin available queries.
Only an authenticated admin can execute these queries.
"""
type AdminQuery @protected{
"Get all enabled domains by hostType"
domainsByHostType(hostType: String!): [String!]
"Get information about the domain"
domainDetails(domain: String!): Domain
}
"""
Contains all admin available mutations
Only an authenticated admin can execute these mutations.
"""
type AdminMutation @protected{
"Add new domain"
addDomain(domain: String!, hostType: String!): Domain
"Remove domain"
removeDomain(domain: String!, hostType: String!): RemoveDomainPayload
"Enable domain"
enableDomain(domain: String!): Domain
"Disable domain"
disableDomain(domain: String!): Domain
}
"""
A dynamic domain representation.
Some operation could return incomplete object i.e. some fields can be null.
"""
type Domain{
"Domain name"
domain: String
"Domain hostType"
hostType: String
"Is domain enabled?"
enabled: Boolean
}
"A result of domain removal"
type RemoveDomainPayload{
"Success message"
msg: String
"Removed domain data"
domain: Domain
}