Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

graphql buildschema

const { graphql, buildSchema } = require('graphql');

const schema = buildSchema(`
  type Query {
    hello: String
  }
`);

const root = { hello: () => 'Hello world!' };

graphql(schema, '{ hello }', root).then((response) => {
  console.log(response);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #graphql #buildschema
ADD COMMENT
Topic
Name
2+2 =