Created
July 31, 2017 02:55
-
-
Save rgstephens/14592c2a80ef8f90b79fbc588d141a8a to your computer and use it in GitHub Desktop.
Sample Schema dev-blog.apollodata.com
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
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