32 lines
448 B
GraphQL
32 lines
448 B
GraphQL
type Query {
|
|
human(id: ID!): Human
|
|
character(id: ID!): Character
|
|
}
|
|
|
|
enum LengthUnit {
|
|
Meter
|
|
Feet
|
|
}
|
|
|
|
interface Character {
|
|
id: ID!
|
|
name: String!
|
|
}
|
|
|
|
type Human implements Character{
|
|
id: ID!
|
|
name: String!
|
|
friends: [Human!]
|
|
height(unit: LengthUnit = METER): Unit!
|
|
friendsConnection(first: Int, after: ID): FriendsConnection!
|
|
}
|
|
|
|
type FriendsConnection {
|
|
totalCount: Int!
|
|
friends: [Character!]
|
|
}
|
|
|
|
type Unit {
|
|
value: Float!
|
|
}
|