Created
May 10, 2018 21:09
-
-
Save geoffjay/a9434febab64034df7799c70688ac82d to your computer and use it in GitHub Desktop.
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' | |
import Configuration from './configuration' | |
import resolvers from '../resolvers' | |
const Query = ` | |
type Query { | |
configuration(id: String!): Configuration | |
configurations: [Configuration] | |
} | |
type Mutation { | |
createConfiguration(id: String!): Configuration | |
} | |
` | |
const SchemaDefinition = ` | |
schema { | |
query: Query | |
mutation: Mutation | |
} | |
` | |
export default makeExecutableSchema({ | |
typeDefs: [ | |
SchemaDefinition, | |
Query, | |
...Configuration | |
], | |
resolvers, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment