Skip to content

Instantly share code, notes, and snippets.

View jarwol's full-sized avatar

Jared Wolinsky jarwol

  • SiriusXM
  • New York City
View GitHub Profile
@jarwol
jarwol / schemaUtils.js
Created January 13, 2017 20:17
GraphQL diff() and merge() extensions
'use strict';
/**
* This module extends the graphql.js schema and types by adding diff and merge functions.
*/
(function () {
const GraphQLSchema = require('graphql/type/schema').GraphQLSchema,
GraphQLObjectType = require('graphql/type/definition').GraphQLObjectType,
GraphQLScalarType = require('graphql/type/definition').GraphQLScalarType,
GraphQLUnionType = require('graphql/type/definition').GraphQLUnionType,