Skip to content

Instantly share code, notes, and snippets.

@alexchamberlain
Created December 22, 2021 19:07
Show Gist options
  • Save alexchamberlain/857a6c10f542e42380392520ab7bf7f1 to your computer and use it in GitHub Desktop.
Save alexchamberlain/857a6c10f542e42380392520ab7bf7f1 to your computer and use it in GitHub Desktop.
enum Episode {
NEWHOPE
EMPIRE
JEDI
}
interface Character {
id: String!
name: String
friends: [Character]
appearsIn: [Episode]
}
type Query {
hero(episode: Episode): Character
human(id: String!): Human
droid(id: String!): Droid
animal(id: String!): Animal
fungus(id: String!): Fungus
alien(id: String!): Alien
}
type Human implements Character {
id: String!
name: String
friends: [Character]
appearsIn: [Episode]
primaryFunction: String
}
type Droid implements Character {
id: String!
name: String
friends: [Character]
appearsIn: [Episode]
primaryFunction: String
}
type Animal implements Character {
id: String!
name: String
friends: [Character]
appearsIn: [Episode]
primaryFunction: String
}
type Fungus implements Character {
id: String!
name: String
friends: [Character]
appearsIn: [Episode]
primaryFunction: String
}
type Alien implements Character {
id: String!
name: String
friends: [Character]
appearsIn: [Episode]
primaryFunction: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment