@coralproject/gql-merge

Tools for merging GraphQL documents

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@coralproject/gql-merge
Minified + gzip package size for @coralproject/gql-merge in KB

Readme

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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.