File: swapi.graphql

package info (click to toggle)
golang-github-vektah-gqlparser 2.5.31-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,120 kB
  • sloc: javascript: 204; sh: 46; makefile: 11
file content (92 lines) | stat: -rw-r--r-- 1,725 bytes parent folder | download | duplicates (5)
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
84
85
86
87
88
89
90
91
92
schema {
	query: Query
	mutation: Mutation
	subscription: Subscription
}
type Query {
	hero(episode: Episode): Character
	reviews(episode: Episode!): [Review]
	search(text: String): [SearchResult]
	character(id: ID!): Character
	droid(id: ID!): Droid
	human(id: ID!): Human
	starship(id: ID!): Starship
}
type Mutation {
	createReview(episode: Episode, review: ReviewInput!): Review
}
type Subscription {
	reviewAdded(episode: Episode): Review
}
enum Episode {
	NEWHOPE
	EMPIRE
	JEDI
}
interface Character {
	id: ID!
	name: String!
	friends: [Character]
	friendsConnection(first: Int, after: ID): FriendsConnection!
	appearsIn: [Episode]!
}
enum LengthUnit {
	METER
	FOOT
}
type Human implements Character {
	id: ID!
	name: String!
	homePlanet: String
	height(unit: LengthUnit = METER): Float
	mass: Float
	friends: [Character]
	friendsConnection(first: Int, after: ID): FriendsConnection!
	appearsIn: [Episode]!
	starships: [Starship]
}
type Droid implements Character {
	id: ID!
	name: String!
	friends: [Character]
	friendsConnection(first: Int, after: ID): FriendsConnection!
	appearsIn: [Episode]!
	primaryFunction: String
}
type FriendsConnection {
	totalCount: Int
	edges: [FriendsEdge]
	friends: [Character]
	pageInfo: PageInfo!
}
type FriendsEdge {
	cursor: ID!
	node: Character
}
type PageInfo {
	startCursor: ID
	endCursor: ID
	hasNextPage: Boolean!
}
type Review {
	episode: Episode
	stars: Int!
	commentary: String
}
input ReviewInput {
	stars: Int!
	commentary: String
	favorite_color: ColorInput
}
input ColorInput {
	red: Int!
	green: Int!
	blue: Int!
}
type Starship {
	id: ID!
	name: String!
	length(unit: LengthUnit = METER): Float
	coordinates: [[Float!]!]
}
union SearchResult = Human | Droid | Starship