graphql-modules

Enterprise Grade Tooling For Your GraphQL Server

Github stars Tracking Chart

modules

npm version
CircleCI
Discord Chat
GitHub license

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're completely independent and 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 or inside the docs directory.

Installation

To install graphql-modules, use the following:

$ npm install @graphql-modules/core

# Or, with Yarn

$ yarn add @graphql-modules/core

Or, in alternative, just use the graphql-modules-seed to get started:

$ git clone https://github.com/darkbasic/graphql-modules-seed.git

Pre-release

We are also publishing a pre-release version to NPM on each change.

Just take a look at the build status on CircleCI and find "Publish Canary" job to get the published version.

Usage

More advanced usage at graphql-modules.com

import { GraphQLModule } from '@graphql-modules/core';

const module = new GraphQLModule({
  typeDefs: gql`
    type Post {
      id: ID
      title: String
      author: User
    }

    type Query {
      posts: [Post]
    }
  `,
  resolvers: blogResolvers,
  imports: [UserModule]
});

Inside the examples directory you can find the following examples:

GraphQL Code Generator integration

GraphQL Modules easily integrates with GraphQL Code Generator. To see how look at the graphql-modules-seed.

Troubleshoot

If you have issues with the generator, feel free open issues in this repository.

Contributing

Feel free to open issues (for bugs/questions) and create pull requests (add generators / fix bugs).

License

GitHub license

MIT

Overview

Name With OwnerUrigo/graphql-modules
Primary LanguageTypeScript
Program languageTypeScript (Language Count: 5)
Platform
License:MIT License
Release Count97
Last Release Namerelease-1698998479477 (Posted on )
First Release Namev0.0.1 (Posted on 2018-06-08 17:14:10)
Created At2018-05-10 16:35:37
Pushed At2024-05-14 01:09:27
Last Commit At2024-04-24 07:39:02
Stargazers Count1.3k
Watchers Count25
Fork Count113
Commits Count2.8k
Has Issues Enabled
Issues Count308
Issue Open Count31
Pull Requests Count1940
Pull Requests Open Count34
Pull Requests Close Count181
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private
To the top