forked from microsoft/cppgraphqlgen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.learn.graphql
More file actions
47 lines (39 loc) · 846 Bytes
/
schema.learn.graphql
File metadata and controls
47 lines (39 loc) · 846 Bytes
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
# This schema is what https://graphql.org/learn/ uses.
# It is extracted from https://github.com/graphql/graphql-js/blob/main/src/__tests__/starWarsSchema.ts.
enum Episode { NEW_HOPE, EMPIRE, JEDI }
interface Character {
id: ID!
name: String
friends: [Character]
appearsIn: [Episode]
}
type Human implements Character {
id: ID!
name: String
friends: [Character]
appearsIn: [Episode]
homePlanet: String
}
type Droid implements Character {
id: ID!
name: String
friends: [Character]
appearsIn: [Episode]
primaryFunction: String
}
type Query {
hero(episode: Episode): Character
human(id: ID!): Human
droid(id: ID!): Droid
}
input ReviewInput {
stars: Int!
commentary: String
}
type Review {
stars: Int!
commentary: String
}
type Mutation {
createReview(ep: Episode! review: ReviewInput!): Review!
}