Skip to content

Instantly share code, notes, and snippets.

@chris-feist
Created March 3, 2020 19:20
Show Gist options
  • Save chris-feist/769f8ca67edab408a49b87b3fc51c8d4 to your computer and use it in GitHub Desktop.
Save chris-feist/769f8ca67edab408a49b87b3fc51c8d4 to your computer and use it in GitHub Desktop.
Temporary GraphQL schema for production GraphQL server example
import { makeExecutableSchema } from 'graphql-tools';
import gql from 'graphql-tag';
const pingSchema = gql`
type Query {
"Returns 'pong'"
ping: String
}
`;
const typeDefs = [
pingSchema,
];
const resolvers = {
Query: {
ping: () => 'pong',
},
};
const schema = makeExecutableSchema({
typeDefs,
resolvers,
});
export default schema;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment