Skip to content

Instantly share code, notes, and snippets.

@ivancorrales
Created January 20, 2019 10:10
Show Gist options
  • Save ivancorrales/9e2c2310e852aa10b4c2bfe5e1631928 to your computer and use it in GitHub Desktop.
Save ivancorrales/9e2c2310e852aa10b4c2bfe5e1631928 to your computer and use it in GitHub Desktop.
GraphQL schema for movies API
enum Genre{
Drama
Comedia
SciFi
Horror
}
scalar Year
scalar Url
interface Person {
id:ID!
name:String!
male:Boolean
}
type Actor implements Person{
id:ID!
name:String!
male:Boolean
profileUrl:Url
}
type Character {
actor: Actor!
name:String!
}
type Director implements Person{
id:ID!
name:String!
male:Boolean
}
type Movie{
id:ID!
title(country:String="Spain"):String!
year:Year
genre:Genre
director: Director!
characters:[Character!]!
audience:Int
boxOffice:Float
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment