@coralproject/gql-merge

0.1.2 • Public • Published

gql-merge

Tools for merging GraphQL documents

Background

This repo contains tools for merging definitions into multiple GraphQL documents into one. For example, say you have these two files GraphQL files:

type Post {
  id: ID!
  content: String
}

type Query {
  postById(id: ID!): Post
}
type Author {
  id: ID!
  name: String
}

type Query {
  postsByAuthorId(id: ID!): [Post]
}

You can use the gql-merge tool to combine these files into one:

The resulting file would look like this:

type Post {
  id: ID!
  content: String
}

type Query {
  postById(id: ID!): Post
  postsByAuthorId(id: ID!): [Post]
}

type Author {
  id: ID!
  name: String
}

Installation

$ yarn add @coralproject/gql-merge

Readme

Keywords

none

Package Sidebar

Install

npm i @coralproject/gql-merge

Weekly Downloads

12

Version

0.1.2

License

MIT

Unpacked Size

4.03 kB

Total Files

3

Last publish

Collaborators

  • kabeaty
  • wyattjoh
  • wikiwi
  • immber
  • tessat
  • nick.funk