Skip to content

Instantly share code, notes, and snippets.

@tibotiber
Last active March 29, 2018 13:15
Show Gist options
  • Save tibotiber/3e6128ea6ad1a650293be2aba61cfc5d to your computer and use it in GitHub Desktop.
Save tibotiber/3e6128ea6ad1a650293be2aba61cfc5d to your computer and use it in GitHub Desktop.
# import {} from "./generated/prisma.graphql"
type Query {
characters(
where: DbCharacterWhereInput
orderBy: DbCharacterOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Character!]!
}
interface Character {
id: ID!
name: String!
friends: [Character]
appearsIn: [Episode]!
}
type Human implements Character {
# interface
id: ID!
name: String!
friends: [Character]
appearsIn: [Episode]!
# custom fields
starships: [Starship]
totalCredits: Int
}
type Droid implements Character {
# interface
id: ID!
name: String!
friends: [Character]
appearsIn: [Episode]!
# custom fields
primaryFunction: String!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment