Stitch together GraphQL fenced code blocks inside GitHub issues into an executable schema.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

graphql-frankenstein graphql-frankenstein

Stitch together GraphQL fenced code blocks inside GitHub issues as an executable schema.

My team is using GitHub Issues to collaborate on different parts of our GraphQL schema. Each distinct part of the schema includes a fenced code block, allowing us to build our schema in pieces. See this repo's issues for an example of how this looks.

graphql-frankenstein will grab each graphql fenced code block across a repo's issue and build a working schema.

graphql-frankenstein only needs 2 things: A repository where your graphql issues are defined, and a list of labels to filter those issues (e.g. only build a schema from issues labeled with #frankenstein in flesch/graphql-frankenstein).

Installation / Usage

graphql-frankenstein can be used as either a dependency in your Node project, or a standalone CLI app.


$ npm install --save graphql-frankenstein
const frankenstein = require('graphql-frankenstein');
const { GraphQLSchema } = require('graphql');

frankenstein('flesch/graphql-frankenstein', ['#frankenstein'])
  .then(schema => {

    console.log(schema instanceof GraphQLSchema);

  }).catch(e => console.error(e));


$ npm install --global graphql-frankenstein
$ frankenstein --help

    $ frankenstein <repository> --labels <labels>
    $ frank <repository> -l <labels>

    --labels, -l   A comma separated list of issue labels.
    --verbose, -v  Print errors instead of failing silently.

    $ frankenstein flesch/graphql-frankenstein --labels "#frankenstein"
    $ frank flesch/graphql-frankenstein -l frankenstein,publish
    $ frankenstein flesch/graphql-frankenstein -l publish > schema.graphql


MIT © John Flesch