# @graphql-modules/core

Latest version **0.7.17** (published 2020-05-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @graphql-modules/core
pnpm add @graphql-modules/core
yarn add @graphql-modules/core
bun add @graphql-modules/core
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.7.17 |
| Published | 2020-05-14 |
| First published | 2018-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 170.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1327 |
| Maintainers | ardatan, dotansimha, kamilkisiela, urigo |

## Links

- npm: https://www.npmjs.com/package/@graphql-modules/core
- Repository: https://github.com/Urigo/graphql-modules
- Homepage: https://graphql-modules.com/
- Issues: https://github.com/Urigo/graphql-modules/issues
- npm.io page: https://npm.io/package/@graphql-modules/core

## Dependencies (7)

- [tslib](https://npm.io/package/tslib.md) 2.0.0
- [deepmerge](https://npm.io/package/deepmerge.md) 4.2.2
- [graphql-tools](https://npm.io/package/graphql-tools.md) 5.0.0
- [@graphql-modules/di](https://npm.io/package/@graphql-modules/di.md) 0.7.17
- [apollo-server-caching](https://npm.io/package/apollo-server-caching.md) 0.5.1
- [@graphql-toolkit/common](https://npm.io/package/@graphql-toolkit/common.md) 0.10.6
- [@graphql-toolkit/schema-merging](https://npm.io/package/@graphql-toolkit/schema-merging.md) 0.10.6

## Recent versions

- 0.7.17 (latest) — 2020-05-14
- 0.7.18-alpha-dca677f.102 (canary) — 2020-08-20
- 0.7.18-alpha-806a329.101 — 2020-08-20
- 0.7.18-alpha-4653a94.101 — 2020-08-20
- 0.7.18-alpha-95a5904.101 — 2020-08-15
- 0.7.18-alpha-f635cd5.101 — 2020-08-14
- 0.7.18-alpha-0515783.101 — 2020-08-12
- 0.7.18-alpha-8819428.100 — 2020-08-12
- 0.7.18-alpha-dc130a1.100 — 2020-08-12
- 0.7.18-alpha-6e7393f.99 — 2020-08-11
- 0.7.18-alpha-48790ac.99 — 2020-08-11
- 0.7.18-alpha-dc098bb.99 — 2020-08-10
- 0.7.18-alpha-022905c.99 — 2020-08-10
- 0.7.18-alpha-90b7d7b.98 — 2020-08-10
- 0.7.18-alpha-e397550.98 — 2020-08-10
- … 2329 more at https://npm.io/package/@graphql-modules/core/versions

## README

[![modules](https://user-images.githubusercontent.com/25294569/64067074-ed185b80-cc2a-11e9-8f4d-5f1e19feaa0a.gif)](https://graphql-modules.com/)

[![npm version](https://badge.fury.io/js/graphql-modules.svg)](https://www.npmjs.com/package/graphql-modules)
![CI](https://github.com/graphql-hive/graphql-modules/workflows/CI/badge.svg)
[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://the-guild.dev/discord)
[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg?maxAge=2592000)]()

**GraphQL Modules** is a toolset of libraries and guidelines dedicated to **create reusable, maintainable, testable and extendable modules** out of your GraphQL server.

- [Website](https://graphql-modules.com)
- [Documentation](https://graphql-modules.com/docs)

## 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](https://graphql-modules.com/docs).

## Installation

To install graphql-modules, use the following:

```sh
$ 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](https://graphql-modules.com/docs)

```js
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:

- [Simple GraphQL-Modules example](./examples/basic)
- [Using dependency injection in GraphQL Modules](./examples/basic-with-dependency-injection)

## 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](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md) before you get started off.

### Code of Conduct

Help us keep GraphQL Modules open and inclusive. Please read and follow our [Code of Conduct](https://github.com/the-guild-org/Stack/blob/master/CODE_OF_CONDUCT.md) as adopted from [Contributor Covenant](https://www.contributor-covenant.org/)

### License

[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg?maxAge=2592000)](https://raw.githubusercontent.com/apollostack/apollo-ios/master/LICENSE)

MIT

---
_Source: https://npm.io/package/@graphql-modules/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
