Skip to content

Instantly share code, notes, and snippets.

@rgstephens
Created July 31, 2017 02:55
Show Gist options
  • Save rgstephens/14592c2a80ef8f90b79fbc588d141a8a to your computer and use it in GitHub Desktop.
Save rgstephens/14592c2a80ef8f90b79fbc588d141a8a to your computer and use it in GitHub Desktop.
Sample Schema dev-blog.apollodata.com
import { makeExecutableSchema } from 'graphql-tools';
const typeDefs = `
type Author {
id: Int
firstName: String
lastName: String
posts: [Post]
}
type Post {
id: Int
title: String
text: String
views: Int
author: Author
}
type Query {
author(firstName: String, lastName: String): Author
getFortuneCookie: String
}
`;
export default makeExecutableSchema({ typeDefs });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment