Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

graphql-compose

> 后端框架
Open source

Toolkit for generating complex GraphQL Schemas on Node.js

1.2K stars0 likes0 views
WebsiteGitHub

About

Toolkit for generating complex GraphQL Schemas on Node.js

graphql-compose

graphql-compose – provides a type registry with a bunch of methods for programmatic schema construction. It allows not only to extend types but also remove fields, interfaces, args. If you want to write your graphql schema generator – graphql-compose is a good instrument for you.

  • provides methods for editing GraphQL output/input types (add/remove fields/args/interfaces)
  • introduces Resolver's – the named graphql fieldConfigs, which can be used for finding, updating, removing records
  • provides an easy way for creating relations between types via Resolver's
  • provides converter from OutputType to InputType
  • provides projection parser from AST
  • provides GraphQL schema language for defining simple types
  • adds additional types Date, Json

And a little bit more

graphql-compose-[plugin] – are declarative generators/plugins built on top of graphql-compose, which take some ORMs, schema definitions and create GraphQL Models from them or modify existing GraphQL Types.

Type generators built on top graphql-compose

  • graphql-compose-json - generates GraphQL type from JSON (a good helper for wrapping REST APIs)
  • graphql-compose-mongoose - generates GraphQL types from mongoose (MongoDB models) with Resolvers.
  • graphql-compose-elasticsearch - generates GraphQL types from elastic mappings; ElasticSearch REST API proxy via GraphQL.
  • graphql-compose-aws - expose AWS Cloud API via GraphQL

Utility plugins:

  • graphql-compose-relay - reassemble GraphQL types with Relay specific things, like Node type and interface, globalId, clientMutationId.
  • graphql-compose-connection - generates connection Resolver from findMany and count Resolvers.
  • graphql-compose-dataloader - adds DataLoader to graphql-composer resolvers.

Documentation

graphql-compose.github.io

Live Demos

  • graphql-compose.herokuapp.com - Live demo of GraphQL Server (9 models, 14 files, ~750 LOC)
  • nodkz.github.io/relay-northwind - Live demo of Relay client working with the server above (8 crazy pages, 47 files, ~3000 LOC)

Examples

Please follow Quick Start Guide for the complete example.

Here is just a demo of ambiguity ways of types definitions:

…

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

MIT

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptgraphqlgraphql-composehacktoberfestschema

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架