Package Exports
- graphql-modules
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (graphql-modules) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
GraphQL Modules is a toolset of libraries and guidelines dedicated to create reusable, maintainable, testable and extendable modules out of your GraphQL server.
Highlights
- Reusable modules - Modules are defined by their GraphQL schema (Schema first design). They can be shared between apps.
- Scalable structure - Manage multiple teams and features, multiple micro-services and servers.
- Gradual growth - A clear, gradual path from a very simple and fast, single-file modules, to scalable multi-file, multi-teams, multi-repo, multi-server modules.
- Testable - A rich toolset around testing, mocking and separation.
Documentation
Documentation is available at graphql-modules.com.
Installation
To install graphql-modules, use the following:
$ npm install graphql-modules
# Or, with Yarn
$ yarn add graphql-modules
Pre-release
We are also publishing a pre-release version to NPM on each change.
Just take a look at the build status on Github Actions and find "Publish Canary" job to get the published version.
Usage
More advanced usage at graphql-modules.com
import { createModule, createApplication } from 'graphql-modules';
const module = createModule({
id: 'my-module',
typeDefs: `
type Post {
id: ID
title: String
author: User
}
type Query {
posts: [Post]
}
`,
resolvers: blogResolvers,
});
const application = createApplication({
modules: [module],
});
Inside the examples
directory you can find the following examples: