Socket
Socket
Sign inDemoInstall

graphql-modules

Package Overview
Dependencies
16
Maintainers
5
Versions
983
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    graphql-modules

Create reusable, maintainable, testable and extendable GraphQL modules


Version published
Weekly downloads
25K
increased by3.62%
Maintainers
5
Install size
2.83 MB
Created
Weekly downloads
 

Readme

Source

modules

npm version CI 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 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, gql } from 'graphql-modules'

const module = createModule({
  id: 'my-module',
  typeDefs: gql`
    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:

Contributions

Contributions, issues and feature requests are very welcome. If you are using this package and fixed a bug for yourself, please consider submitting a PR!

And if this is your first time contributing to this project, please do read our Contributor Workflow Guide before you get started off.

Code of Conduct

Help us keep GraphQL Modules open and inclusive. Please read and follow our Code of Conduct as adopted from Contributor Covenant

License

GitHub license

MIT

Keywords

FAQs

Last updated on 03 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc