Skip to content

Instantly share code, notes, and snippets.

View chrisl777's full-sized avatar

Chris Livdahl chrisl777

View GitHub Profile
@chrisl777
chrisl777 / schema.js
Created April 27, 2018 23:35
A more involved GraphQL schema involving Movies and TV Show information.
const schema = `
type Query {
movie(id: ID!): Movie
tvShow(id: ID!): TVShow
movies(year: Int, page: Int): Movies
}
interface Media {
id: ID! @isUnique
externalId: String! @isUnique
@chrisl777
chrisl777 / schema.js
Last active April 27, 2018 22:28
A simple GraphQL server-side schema containing Movie info with Genre.
type Query {
movie(id: ID!): Movie
}
type Movie {
id: ID! @isUnique
title: String!
budget: Int
popularity: Float!
tagline: String