# @raydeck/merge-graphql

> Stitch together graphql schemas from dependencies

Latest version **1.2.0** (published 2020-08-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @raydeck/merge-graphql
pnpm add @raydeck/merge-graphql
yarn add @raydeck/merge-graphql
bun add @raydeck/merge-graphql
```

Provides the command `merge-graphql`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2020-08-17 |
| First published | 2020-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 12.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ray Deck |
| Maintainers | raydeck |

## Links

- npm: https://www.npmjs.com/package/@raydeck/merge-graphql
- Repository: https://github.com/rhdeck/merge-graphql
- Homepage: https://github.com/rhdeck/merge-graphql#readme
- Issues: https://github.com/rhdeck/merge-graphql/issues
- npm.io page: https://npm.io/package/@raydeck/merge-graphql

## Dependencies (2)

- [commander](https://npm.io/package/commander.md) ^6.0.0
- [graphql-schema-utilities](https://npm.io/package/graphql-schema-utilities.md) ^1.1.3

## Recent versions

- 1.2.0 (latest) — 2020-08-17
- 1.1.0 — 2020-08-04
- 1.0.2 — 2020-08-03
- 1.0.1 — 2020-08-03
- 1.0.0 — 2020-08-03

## README

<a name="_climd"></a>

# Usage
```bash
npx @raydeck/merge-graphql [options]
```
# Options
* -o --output \<`path-to-schema.graphql`> File to emit results to (default: `/Users/ray/Documents/GitHub/merge-graphql/schema.graphql`)
* -p --path \<`path-to-workspace`> Path to workspace (default: `/Users/ray/Documents/GitHub/merge-graphql`)

<a name="_librarymd"></a>


# @raydeck/merge-graphql - v1.2.0

## Index

### Functions

* [mergeDependencies](#mergedependencies)
* [mergeFromGlobs](#mergefromglobs)

## Functions

###  mergeDependencies

▸ **mergeDependencies**(`startPath`: string): *Promise‹string›*

*Defined in [index.ts:11](https://github.com/rhdeck/merge-graphql/blob/521df48/src/index.ts#L11)*

Extract and merge graphql schemas from dependencies into a single string.

Gets all from schemas/common and then just the ones for your project (identified in schemas/{name})

**Parameters:**

Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`startPath` | string | process.cwd() | Path to start looking at package.json and associated node_modules  |

**Returns:** *Promise‹string›*

___

###  mergeFromGlobs

▸ **mergeFromGlobs**(`globs`: string[]): *Promise‹string›*

*Defined in [index.ts:36](https://github.com/rhdeck/merge-graphql/blob/521df48/src/index.ts#L36)*

Merge schema files found in an array of glob strings into a single schema file

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`globs` | string[] | array of glob strings (ex: ./schemas/*.graphql)  |

**Returns:** *Promise‹string›*

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