Last active
April 27, 2018 22:28
-
-
Save chrisl777/d2dedd272a17db0a25e23773bb90a77f to your computer and use it in GitHub Desktop.
A simple GraphQL server-side schema containing Movie info with Genre.
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
type Query { | |
movie(id: ID!): Movie | |
} | |
type Movie { | |
id: ID! @isUnique | |
title: String! | |
budget: Int | |
popularity: Float! | |
tagline: String | |
overview: String | |
status: String | |
runtime: Int | |
release_date: String | |
vote_average: Float | |
vote_count: Int | |
poster_path: String | |
backdrop_path: String | |
genres: [Genre] @relation(name: "MovieGenres") | |
} | |
type Genre @model { | |
id: ID! @isUnique | |
name: String! | |
movie: Movie! @relation(name: "MovieGenres") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment