forked from thinkb4/a-walk-in-graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.gql
43 lines (37 loc) · 919 Bytes
/
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
"""
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.")
}
type Person {
id: ID
name: String
surname: String
fullName: String
email: String
age: Int
eyeColor: String
friends (id: ID): [Person!]
skills (id: ID): [Skill!]
favSkill: Skill
}
type Query {
randomSkill: Skill!
randomPerson: Person!
skill (id: ID): Skill
person (id: ID): Person
skills (id: ID): [Skill!]
persons (id: ID): [Person!]
}