-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathschema.gql
83 lines (71 loc) · 1.47 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
"""
This is a description notation
@see [GraphQL Spec (June 2018)](https://spec.graphql.org/June2018/#sec-Descriptions)
"""
type Skill {
# This is only a comment
id: ID
"This defines a relationship with a Skill Object Type value"
parent: Skill
"this is a field level description"
name: String!
"""
This field has a @deprecated directive
@see [Using schema directives](https://www.apollographql.com/docs/apollo-server/schema/directives/)
"""
now: String! @deprecated(reason: "This is just an example of a virtual field.")
}
enum EyeColor {
BLUE
GREEN
BROWN
BLACK
}
input InputPerson {
id: ID
age: Int
eyeColor: EyeColor
favSkill: ID
}
input InputPersonCreate {
name: String!
surname: String
email: String
age: Int
eyeColor: EyeColor
friends: [ID!]
skills: [ID!]
favSkill: ID
}
input InputSkill {
id: ID
name: String
}
input InputSkillCreate {
name: String!
parent: ID
}
type Person {
id: ID
name: String!
surname: String
fullName: String
email: String
age: Int
eyeColor: EyeColor
friends (input: InputPerson): [Person!]
skills (input: InputSkill): [Skill!]
favSkill: Skill
}
type Query {
randomSkill: Skill!
randomPerson: Person!
skill (input: InputSkill): Skill
person (input: InputPerson): Person
skills (input: InputSkill): [Skill!]
persons (input: InputPerson): [Person!]
}
type Mutation {
createSkill (input: InputSkillCreate): Skill!
createPerson (input: InputPersonCreate): Person!
}