GraphQL Makers
Functions to make GraphQL types based on schema-language definitions.
WARNING: This is a work-in-progress. It has been briefly tested but only on a recent version of Node/GraphQL.js and for limited use cases.
Examples
GraphQLObjectType
object
Create a const objectType = ; const dependencies = Comment: require; const typeDef = ` type Post { id: ID title: String content: String user: User comments: [Comment] }`; const resolvers = { // ... } { // ... }; moduleexports = ;
GraphQLSchema
object
Create a const typeDef = ` type Query { list: [Int!]! }`; const resolvers = Query: 1 2 3 ; moduleexports = ;
License
GraphQL Makers is MIT licensed.