Skip to content

Instantly share code, notes, and snippets.

@pallavtrivedi03
Created January 7, 2019 13:35
Show Gist options
  • Save pallavtrivedi03/a1a7053308ae8af755ea17e74a6259d6 to your computer and use it in GitHub Desktop.
Save pallavtrivedi03/a1a7053308ae8af755ea17e74a6259d6 to your computer and use it in GitHub Desktop.
GraphQL schema for Movie
module.exports = {'movieBuildSchema':`
type Movie {
_id: ID!
title: String!
year: Int!
released: String!
genre: String!
director: String!
actors: String!
plot: String!
poster: String!
imdbRating: Float!
language: String!
runtime: Int!
}
input MovieInput {
title: String!
year: Int!
released: String!
genre: String!
director: String!
actors: String!
plot: String!
poster: String!
imdbRating: Float!
language: String!
runtime: Int!
}
type RootQuery {
movies: [Movie!]!
}
type RootMutation {
createMovie(movieInput: MovieInput): Movie
}
schema {
query: RootQuery
mutation: RootMutation
}
`};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment