Skip to content

Instantly share code, notes, and snippets.

@govorov
Created October 14, 2017 00:50
Show Gist options
  • Save govorov/0f302435c10bc32f54ec8fd0f0fb8a01 to your computer and use it in GitHub Desktop.
Save govorov/0f302435c10bc32f54ec8fd0f0fb8a01 to your computer and use it in GitHub Desktop.
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