Created
October 14, 2017 00:50
-
-
Save govorov/0f302435c10bc32f54ec8fd0f0fb8a01 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 { GraphQLSchema } from 'graphql'; | |
import { Query } from 'graphql/types/query'; | |
import { types } from 'graphql/types'; | |
import { resolvers } from 'graphql/resolvers'; | |
const schemaDefinition = ` | |
schema { | |
query: Query | |
} | |
`; | |
const typeDefs = [ | |
schemaDefinition, | |
Query, | |
...types, | |
]; | |
export const schema = makeExecutableSchema({ | |
typeDefs, | |
resolvers, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment