# @anchan828/gen-graphql-merge-schema

> merge multiple schema. merge-graphql-schemas based.

Latest version **0.7.68** (published 2023-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @anchan828/gen-graphql-merge-schema
pnpm add @anchan828/gen-graphql-merge-schema
yarn add @anchan828/gen-graphql-merge-schema
bun add @anchan828/gen-graphql-merge-schema
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.7.68 |
| Published | 2023-04-16 |
| First published | 2019-04-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | anchan828 |
| Maintainers | anchan828 |

## Links

- npm: https://www.npmjs.com/package/@anchan828/gen-graphql-merge-schema
- Repository: https://github.com/anchan828/gen-graphql-schema
- Homepage: https://github.com/anchan828/gen-graphql-schema/tree/master/packages/merge-schema#readme
- Issues: https://github.com/anchan828/gen-graphql-schema/issues
- npm.io page: https://npm.io/package/@anchan828/gen-graphql-merge-schema

## Dependencies (6)

- [deepmerge](https://npm.io/package/deepmerge.md) ^4.3.1
- [@graphql-tools/merge](https://npm.io/package/@graphql-tools/merge.md) ^8.4.1
- [@anchan828/gen-graphql-order-schema](https://npm.io/package/@anchan828/gen-graphql-order-schema.md) ^0.7.68
- [@anchan828/gen-graphql-relay-schema](https://npm.io/package/@anchan828/gen-graphql-relay-schema.md) ^0.7.68
- [@anchan828/gen-graphql-where-schema](https://npm.io/package/@anchan828/gen-graphql-where-schema.md) ^0.7.68
- [@anchan828/gen-graphql-schema-common](https://npm.io/package/@anchan828/gen-graphql-schema-common.md) ^0.7.68

## Recent versions

- 0.7.68 (latest) — 2023-04-16
- 0.7.67 — 2023-04-09
- 0.7.66 — 2023-04-02
- 0.7.65 — 2023-03-26
- 0.7.64 — 2023-03-19
- 0.7.63 — 2023-03-12
- 0.7.62 — 2023-03-05
- 0.7.61 — 2023-02-26
- 0.7.60 — 2023-02-19
- 0.7.59 — 2023-02-12
- 0.7.58 — 2023-02-05
- 0.7.57 — 2023-01-29
- 0.7.56 — 2023-01-22
- 0.7.55 — 2023-01-15
- 0.7.54 — 2023-01-08
- … 173 more at https://npm.io/package/@anchan828/gen-graphql-merge-schema/versions

## README

# @anchan828/gen-graphql-merge-schema

## Description

Merge multiple schema. merge-graphql-schemas based.

Supported directives: [@orderBy](https://www.npmjs.com/package/@anchan828/gen-graphql-order-schema) [@where](https://www.npmjs.com/package/@anchan828/gen-graphql-where-schema) [@relay](https://www.npmjs.com/package/@anchan828/gen-graphql-relay-schema)

## Quick Start

```ts
import { mergeTypes } from "@anchan828/gen-graphql-merge-schema";

const types = [`type Test {id: ID}`, `type Test2 {tests: [Test] @orderBy @where @relay }`];

mergeTypes(types);
//=>  """A connection for relay"""
//    interface Connection {
//      """Identifies the total count of items in the connection."""
//      totalCount: Int
//
//      """Information to aid in pagination."""
//      pageInfo: PageInfo!
//
//      """A list of edges."""
//      edges: [Edge]
//    }
//
//    """An edge in a connection."""
//    interface Edge {
//      """A cursor for use in pagination."""
//      cursor: String
//    }
//
//    input IDWhereOperator {
//      type: IDWhereOperatorType!
//      value: [ID]!
//    }
//
//    enum IDWhereOperatorType {
//      EQ
//      NOT_EQ
//      IN
//      NOT_IN
//    }
//
//    """An object with an ID."""
//    interface Node {
//      """ID of the object."""
//      id: ID!
//    }
//
//    enum OrderDirection {
//      ASC
//      DESC
//    }
//
//    """Information about pagination in a connection."""
//    type PageInfo {
//      """When paginating backwards, the cursor to continue."""
//      startCursor: String
//
//      """When paginating forwards, the cursor to continue."""
//      endCursor: String
//
//      """When paginating forwards, are there more items?"""
//      hasNextPage: Boolean
//
//      """When paginating backwards, are there more items?"""
//      hasPreviousPage: Boolean
//    }
//
//    type Query
//
//    type Test implements Node {
//      id: ID
//    }
//
//    type Test2 {
//      tests(orderBy: [TestOrder], where: TestWhere, before: String, after: String, first: Int, last: Int): TestConnection
//    }
//
//    """The connection type for Test"""
//    type TestConnection implements Connection {
//      """Identifies the total count of Test items in the connection."""
//      totalCount: Int
//
//      """A list of TestEdge."""
//      edges: [TestEdge]
//
//      """Information to aid in pagination."""
//      pageInfo: PageInfo!
//    }
//
//    """An edge in a TestConnection."""
//    type TestEdge implements Edge {
//      """The item at the end of the edge."""
//      node: Test
//
//      """A cursor for use in pagination."""
//      cursor: String
//    }
//
//    input TestOrder {
//      sort: TestSort
//      direction: OrderDirection
//    }
//
//    enum TestSort {
//      ID
//    }
//
//    input TestWhere {
//      id: [IDWhereOperator]
//    }
```

## License

[MIT](LICENSE).

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