graphql-function

1.0.1 • Public • Published

graphql-function Build Status js-standard-style

GraphQL Function Type

Installation

npm i --save graphql-function

Usage

var GraphQLFunction = require('graphql-function')
 
// Use graphql-function in your GraphQL objects for Function properties
var fooType = new GraphQLObjectType({
  name: 'Foo',
  description: 'Some foo function',
  fields: {
    add: {
      function: GraphQLFunction,
      description: 'Function that adds two numbers'
    },
  }
});
 
var queryType = new GraphQLObjectType({
  name: 'Query',
  fields: {
    foo: {
      function: fooType,
      resolve: function () {
        // ...
      },
    },
  }
})

License

MIT

/graphql-function/

    Package Sidebar

    Install

    npm i graphql-function

    Weekly Downloads

    5

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • tjmehta