Created
January 20, 2019 10:10
-
-
Save ivancorrales/9e2c2310e852aa10b4c2bfe5e1631928 to your computer and use it in GitHub Desktop.
GraphQL schema for movies API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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