0.1.1 • Published 5 years ago

graphql-create-schema v0.1.1

Weekly downloads
7
License
Apache-2.0
Repository
github
Last release
5 years ago

graphql-create-schema

create a graphql schema using one or more files.

Each file containing queries, mutations, types or resolvers is then merged to a single executable schema.

js-standard-style

usage

const { makeExecutableSchema } = require('graphql-tools')
const createSchema = require('graphql-create-schema')
const types = [
  require('./user'),
  require('./product')
]
const schema = createSchema(makeExecutableSchema, types)

each file can export their own typeDefs and resolvers

// type.js
module.exports = {
  typeDefs: {
    query: '....',
    mutation: '....',
    types: '',
  },
  resolvers: {
    Query: {}
    Mutation: {}
  }
}

license

Apache License, Version 2.0

0.1.0

5 years ago

0.1.1

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago