Skip to content

Instantly share code, notes, and snippets.

@stubailo
Created May 16, 2018 05:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stubailo/3341ae3f3637e779fbe10ed42db8c1f0 to your computer and use it in GitHub Desktop.
Save stubailo/3341ae3f3637e779fbe10ed42db8c1f0 to your computer and use it in GitHub Desktop.
const { buildSchema, graphqlSync, introspectionQuery } = require("graphql");
const sdlString = `
type Query {
hello: String
}
`;
const graphqlSchemaObj = buildSchema(sdlString);
const result = graphqlSync(graphqlSchemaObj, introspectionQuery).data;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment