GQB
This package allows you to injects type resolvers directly into GraphQL schema language.
Why
A lot of boilerplate code if write schemas on javascript graphql-js.
This is better graphql-tools but resolvers described after the schema.
How it works
Using tagged template literals we can place resolvers directly inside schema.
;;; const schema = gqb` type Query { hello: String, pic(size: Int): String } type Mutation { setMessage(message: String): String }`; const executableSchema = ; ;
Type fields resolver now are placed directly in the schema, immediatelly after type!!!
It also supports schema inlining, (see tests)
See the source it's small.