GraphQLBoot
Maybe the best practice for GraphQL on node.js project.
Features:
- Using decorator
@GraphqlSchema
to define GraphQL schema so that you could write schema & resolver together graphql
tag for IDE syntax highlight- Scanning all
*.graphqls
file as GraphQL schema, for better experience of WebStorm Plugin JS GraphQL - Built-in common scalars such as
JSON
/URL
/Timestamp
/Range
, etc.
Before using GraphQLBoot:
var express = ;var bodyParser = ;var graphqlExpress graphiqlExpress = ;var makeExecutableSchema = ; var typeDefs = `type Query { hello: String} schema { query: Query}`; var resolvers = Query: { return 'world'; } ; var schema = ;var app = ;app;app;app;
After using GraphQLBoot:
;;; const app = ;const resolvers = Query: @ hello: async return 'world'; const graphqlBoot = ;app;app;app;
Check a full project to get more details: avnpc.js