0.1.1 • Published 4 years ago

graphql-create-schema v0.1.1

Weekly downloads
7
License
Apache-2.0
Repository
github
Last release
4 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

4 years ago

0.1.1

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago