Last active
April 11, 2018 10:48
-
-
Save wojciech-bilicki/3617365f077ea5d72a349451bc32761f to your computer and use it in GitHub Desktop.
adding query type
This file contains 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, addMockFunctionsToSchema} from 'graphql-tools'; | |
const typeDefs = ` | |
type Author { | |
age: Int | |
name: String, | |
Books: [String] | |
} | |
type Query { | |
author: [Author] | |
} | |
`; | |
const schema = makeExecutableSchema({typeDefs}); | |
addMockFunctionsToSchema({schema}) | |
export default schema; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment