Skip to content

Include graphql-lodash.bundle.js in distribution. #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

k00p
Copy link

@k00p k00p commented Feb 19, 2019

This PR adds a build:dist script to package.json to include graphql-lodash.bundle.js in npm distribution, which gets copied from lib/ to a new directory dist/.

Sourcing the pre-built graphql-lodash.bundle.js is useful for scenarios where it is not feasible or desirable to build out a complete React application. For example, if you are integrating graphql-lodash in an express-graphql session, it is a fairly significant amount of work/code to set up the React stack and build out the GraphiQL interface, and then integrate graphql-lodash. It is relatively easy to build the graphql-lodash bundle, and include that as well as the GraphiQL bundle on a page as in the GraphiQL example.

The fetch function becomes:

      function grapQLLodashFetcher(graphQLParams) {
        const { query, transform } = window.GQLLodash.graphqlLodash(
          graphQLParams.query,
          graphQLParams.operationName
        );
        graphQLParams.query = query;
        return fetch('/graphql', {
          method: 'post',
          headers: {
            'Accept': 'application/json',
            'Content-Type': 'application/json',
          },
          body: JSON.stringify(graphQLParams),
          credentials: 'include',
        }).then(function (response) {
          if (response.ok) {
            return response.json();
          } else {
            return response.text().then(body => {
              throw Error(response.status + ' ' + response.statusText + '\n' + body);
            });
          }
        }).then(function (responseBody) {
          responseBody.data = transform(responseBody.data);
          return responseBody;
        });
      }

Using a dist/ directory is fairly common practice for providing bundles, but another route may be preferred.

@k00p
Copy link
Author

k00p commented Feb 20, 2019

By the way - this project is a really fun idea. Thank you!

@@ -0,0 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("GQLLodash",[],t):"object"==typeof exports?exports.GQLLodash=t():e.GQLLodash=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=97)}([function(e,t,n){"use strict";var r=Array.isArray;t.a=r},function(e,t,n){"use strict";function r(e){return"function"==typeof e?e:null==e?o.a:"object"==typeof e?Object(u.a)(e)?Object(a.a)(e[0],e[1]):Object(i.a)(e):Object(c.a)(e)}var i=n(163),a=n(184),o=n(12),u=n(0),c=n(188);t.a=r},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return e instanceof M||e instanceof R||e instanceof C||e instanceof V||e instanceof U||e instanceof x||e instanceof B||e instanceof K}function o(e){return a(e)||(0,A.default)(0,"Expected "+String(e)+" to be a GraphQL type."),e}function u(e){return e instanceof M||e instanceof U||e instanceof x||e instanceof K&&u(e.ofType)||e instanceof B&&u(e.ofType)}function c(e){return u(e)||(0,A.default)(0,"Expected "+String(e)+" to be a GraphQL input type."),e}function s(e){return e instanceof M||e instanceof R||e instanceof C||e instanceof V||e instanceof U||e instanceof K&&s(e.ofType)||e instanceof B&&s(e.ofType)}function f(e){return s(e)||(0,A.default)(0,"Expected "+String(e)+" to be a GraphQL output type."),e}function l(e){return e instanceof M||e instanceof U}function p(e){return l(e)||(0,A.default)(0,"Expected "+String(e)+" to be a GraphQL leaf type."),e}function d(e){return e instanceof R||e instanceof C||e instanceof V}function v(e){return d(e)||(0,A.default)(0,"Expected "+String(e)+" to be a GraphQL composite type."),e}function y(e){return e instanceof C||e instanceof V}function h(e){return y(e)||(0,A.default)(0,"Expected "+String(e)+" to be a GraphQL abstract type."),e}function b(e){return e instanceof K?e.ofType:e}function m(e){return e instanceof M||e instanceof R||e instanceof C||e instanceof V||e instanceof U||e instanceof x}function O(e){return m(e)||(0,A.default)(0,"Expected "+String(e)+" to be a GraphQL named type."),e}function T(e){if(e){for(var t=e;t instanceof B||t instanceof K;)t=t.ofType;return t}}function j(e){return"function"==typeof e?e():e}function _(e,t){var n=j(t);if(!n)return[];Array.isArray(n)||(0,A.default)(0,e.name+" interfaces must be an Array or a function which returns an Array.");var r=Object.create(null);return n.forEach(function(t){t instanceof C||(0,A.default)(0,e.name+" may only implement Interface types, it cannot implement: "+String(t)+"."),r[t.name]&&(0,A.default)(0,e.name+" may declare it implements "+t.name+" only once."),r[t.name]=!0,"function"!=typeof t.resolveType&&"function"!=typeof e.isTypeOf&&(0,A.default)(0,"Interface Type "+t.name+' does not provide a "resolveType" function and implementing Type '+e.name+' does not provide a "isTypeOf" function. There is no way to resolve this implementing type during execution.')}),n}function N(e,t){var n=j(t);g(n)||(0,A.default)(0,e.name+" fields must be an object with field names as keys or a function which returns such an object.");var r=Object.keys(n);r.length>0||(0,A.default)(0,e.name+" fields must be an object with field names as keys or a function which returns such an object.");var i=Object.create(null);return r.forEach(function(t){(0,F.assertValidName)(t);var r=n[t];g(r)||(0,A.default)(0,e.name+"."+t+" field config must be an object"),r.hasOwnProperty("isDeprecated")&&(0,A.default)(0,e.name+"."+t+' should provide "deprecationReason" instead of "isDeprecated".');var a=w({},r,{isDeprecated:Boolean(r.deprecationReason),name:t});s(a.type)||(0,A.default)(0,e.name+"."+t+" field type must be Output Type but got: "+String(a.type)+"."),E(a.resolve)||(0,A.default)(0,e.name+"."+t+" field resolver must be a function if provided, but got: "+String(a.resolve)+".");var o=r.args;o?(g(o)||(0,A.default)(0,e.name+"."+t+" args must be an object with argument names as keys."),a.args=Object.keys(o).map(function(n){(0,F.assertValidName)(n);var r=o[n];return u(r.type)||(0,A.default)(0,e.name+"."+t+"("+n+":) argument type must be Input Type but got: "+String(r.type)+"."),{name:n,description:void 0===r.description?null:r.description,type:r.type,defaultValue:r.defaultValue,astNode:r.astNode}})):a.args=[],i[t]=a}),i}function g(e){return e&&"object"===(void 0===e?"undefined":S(e))&&!Array.isArray(e)}function E(e){return null==e||"function"==typeof e}function L(e,t){var n=j(t);Array.isArray(n)&&n.length>0||(0,A.default)(0,"Must provide Array of types or a function which returns such an array for Union "+e.name+".");var r=Object.create(null);return n.forEach(function(t){t instanceof R||(0,A.default)(0,e.name+" may only contain Object types, it cannot contain: "+String(t)+"."),r[t.name]&&(0,A.default)(0,e.name+" can include "+t.name+" type only once."),r[t.name]=!0,"function"!=typeof e.resolveType&&"function"!=typeof t.isTypeOf&&(0,A.default)(0,'Union type "'+e.name+'" does not provide a "resolveType" function and possible type "'+t.name+'" does not provide an "isTypeOf" function. There is no way to resolve this possible type during execution.')}),n}function I(e,t){g(t)||(0,A.default)(0,e.name+" values must be an object with value names as keys.");var n=Object.keys(t);return n.length>0||(0,A.default)(0,e.name+" values must be an object with value names as keys."),n.map(function(n){(0,F.assertValidName)(n),-1!==["true","false","null"].indexOf(n)&&(0,A.default)(0,'Name "'+n+'" can not be used as an Enum value.');var r=t[n];return g(r)||(0,A.default)(0,e.name+"."+n+' must refer to an object with a "value" key representing an internal value but got: '+String(r)+"."),r.hasOwnProperty("isDeprecated")&&(0,A.default)(0,e.name+"."+n+' should provide "deprecationReason" instead of "isDeprecated".'),{name:n,description:r.description,isDeprecated:Boolean(r.deprecationReason),deprecationReason:r.deprecationReason,astNode:r.astNode,value:r.hasOwnProperty("value")?r.value:n}})}Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLNonNull=t.GraphQLList=t.GraphQLInputObjectType=t.GraphQLEnumType=t.GraphQLUnionType=t.GraphQLInterfaceType=t.GraphQLObjectType=t.GraphQLScalarType=void 0;var S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.isType=a,t.assertType=o,t.isInputType=u,t.assertInputType=c,t.isOutputType=s,t.assertOutputType=f,t.isLeafType=l,t.assertLeafType=p,t.isCompositeType=d,t.assertCompositeType=v,t.isAbstractType=y,t.assertAbstractType=h,t.getNullableType=b,t.isNamedType=m,t.assertNamedType=O,t.getNamedType=T;var k=n(2),A=r(k),D=n(13),G=r(D),Q=n(4),P=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(Q),F=n(59),M=t.GraphQLScalarType=function(){function e(t){i(this,e),(0,F.assertValidName)(t.name),this.name=t.name,this.description=t.description,this.astNode=t.astNode,"function"!=typeof t.serialize&&(0,A.default)(0,this.name+' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.'),(t.parseValue||t.parseLiteral)&&("function"!=typeof t.parseValue||"function"!=typeof t.parseLiteral)&&(0,A.default)(0,this.name+' must provide both "parseValue" and "parseLiteral" functions.'),this._scalarConfig=t}return e.prototype.serialize=function(e){return(0,this._scalarConfig.serialize)(e)},e.prototype.isValidValue=function(e){return!(0,G.default)(this.parseValue(e))},e.prototype.parseValue=function(e){var t=this._scalarConfig.parseValue;return t&&!(0,G.default)(e)?t(e):void 0},e.prototype.isValidLiteral=function(e){return!(0,G.default)(this.parseLiteral(e))},e.prototype.parseLiteral=function(e){var t=this._scalarConfig.parseLiteral;return t?t(e):void 0},e.prototype.toString=function(){return this.name},e}();M.prototype.toJSON=M.prototype.inspect=M.prototype.toString;var R=t.GraphQLObjectType=function(){function e(t){i(this,e),(0,F.assertValidName)(t.name,t.isIntrospection),this.name=t.name,this.description=t.description,this.astNode=t.astNode,this.extensionASTNodes=t.extensionASTNodes||[],t.isTypeOf&&"function"!=typeof t.isTypeOf&&(0,A.default)(0,this.name+' must provide "isTypeOf" as a function.'),this.isTypeOf=t.isTypeOf,this._typeConfig=t}return e.prototype.getFields=function(){return this._fields||(this._fields=N(this,this._typeConfig.fields))},e.prototype.getInterfaces=function(){return this._interfaces||(this._interfaces=_(this,this._typeConfig.interfaces))},e.prototype.toString=function(){return this.name},e}();R.prototype.toJSON=R.prototype.inspect=R.prototype.toString;var C=t.GraphQLInterfaceType=function(){function e(t){i(this,e),(0,F.assertValidName)(t.name),this.name=t.name,this.description=t.description,this.astNode=t.astNode,t.resolveType&&"function"!=typeof t.resolveType&&(0,A.default)(0,this.name+' must provide "resolveType" as a function.'),this.resolveType=t.resolveType,this._typeConfig=t}return e.prototype.getFields=function(){return this._fields||(this._fields=N(this,this._typeConfig.fields))},e.prototype.toString=function(){return this.name},e}();C.prototype.toJSON=C.prototype.inspect=C.prototype.toString;var V=t.GraphQLUnionType=function(){function e(t){i(this,e),(0,F.assertValidName)(t.name),this.name=t.name,this.description=t.description,this.astNode=t.astNode,t.resolveType&&"function"!=typeof t.resolveType&&(0,A.default)(0,this.name+' must provide "resolveType" as a function.'),this.resolveType=t.resolveType,this._typeConfig=t}return e.prototype.getTypes=function(){return this._types||(this._types=L(this,this._typeConfig.types))},e.prototype.toString=function(){return this.name},e}();V.prototype.toJSON=V.prototype.inspect=V.prototype.toString;var U=t.GraphQLEnumType=function(){function e(t){i(this,e),this.name=t.name,(0,F.assertValidName)(t.name,t.isIntrospection),this.description=t.description,this.astNode=t.astNode,this._values=I(this,t.values),this._enumConfig=t}return e.prototype.getValues=function(){return this._values},e.prototype.getValue=function(e){return this._getNameLookup()[e]},e.prototype.serialize=function(e){var t=this._getValueLookup().get(e);return t?t.name:null},e.prototype.isValidValue=function(e){return"string"==typeof e&&void 0!==this._getNameLookup()[e]},e.prototype.parseValue=function(e){if("string"==typeof e){var t=this._getNameLookup()[e];if(t)return t.value}},e.prototype.isValidLiteral=function(e){return e.kind===P.ENUM&&void 0!==this._getNameLookup()[e.value]},e.prototype.parseLiteral=function(e){if(e.kind===P.ENUM){var t=this._getNameLookup()[e.value];if(t)return t.value}},e.prototype._getValueLookup=function(){if(!this._valueLookup){var e=new Map;this.getValues().forEach(function(t){e.set(t.value,t)}),this._valueLookup=e}return this._valueLookup},e.prototype._getNameLookup=function(){if(!this._nameLookup){var e=Object.create(null);this.getValues().forEach(function(t){e[t.name]=t}),this._nameLookup=e}return this._nameLookup},e.prototype.toString=function(){return this.name},e}();U.prototype.toJSON=U.prototype.inspect=U.prototype.toString;var x=t.GraphQLInputObjectType=function(){function e(t){i(this,e),(0,F.assertValidName)(t.name),this.name=t.name,this.description=t.description,this.astNode=t.astNode,this._typeConfig=t}return e.prototype.getFields=function(){return this._fields||(this._fields=this._defineFieldMap())},e.prototype._defineFieldMap=function(){var e=this,t=j(this._typeConfig.fields);g(t)||(0,A.default)(0,this.name+" fields must be an object with field names as keys or a function which returns such an object.");var n=Object.keys(t);n.length>0||(0,A.default)(0,this.name+" fields must be an object with field names as keys or a function which returns such an object.");var r=Object.create(null);return n.forEach(function(n){(0,F.assertValidName)(n);var i=w({},t[n],{name:n});u(i.type)||(0,A.default)(0,e.name+"."+n+" field type must be Input Type but got: "+String(i.type)+"."),null!=i.resolve&&(0,A.default)(0,e.name+"."+n+" field type has a resolve property, but Input Types cannot define resolvers."),r[n]=i}),r},e.prototype.toString=function(){return this.name},e}();x.prototype.toJSON=x.prototype.inspect=x.prototype.toString;var B=t.GraphQLList=function(){function e(t){i(this,e),a(t)||(0,A.default)(0,"Can only create List of a GraphQLType but got: "+String(t)+"."),this.ofType=t}return e.prototype.toString=function(){return"["+String(this.ofType)+"]"},e}();B.prototype.toJSON=B.prototype.inspect=B.prototype.toString;var K=t.GraphQLNonNull=function(){function e(t){i(this,e),(!a(t)||t instanceof e)&&(0,A.default)(0,"Can only create NonNull of a Nullable GraphQLType but got: "+String(t)+"."),this.ofType=t}return e.prototype.toString=function(){return this.ofType.toString()+"!"},e}();K.prototype.toJSON=K.prototype.inspect=K.prototype.toString},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.VARIABLE="Variable",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.TYPE_EXTENSION_DEFINITION="TypeExtensionDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition"},function(e,t,n){"use strict";var r=n(64),i="object"==typeof self&&self&&self.Object===Object&&self,a=r.a||i||Function("return this")();t.a=a},function(e,t,n){"use strict";function r(e){var t=Object(i.a)(e),n=t%1;return t===t?n?t-n:t:0}var i=n(199);t.a=r},function(e,t,n){"use strict";function r(e,t){var n=Object(a.a)(e,t);return Object(i.a)(n)?n:void 0}var i=n(123),a=n(126);t.a=r},function(e,t,n){"use strict";function r(e){return"symbol"==typeof e||Object(a.a)(e)&&Object(i.a)(e)==o}var i=n(14),a=n(16),o="[object Symbol]";t.a=r},function(e,t,n){"use strict";function r(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.a=r},function(e,t,n){"use strict";var r=n(47),i=n(159),a=Object(i.a)(r.a);t.a=a},function(e,t,n){"use strict";function r(e){return Object(o.a)(e)?Object(i.a)(e):Object(a.a)(e)}var i=n(149),a=n(155),o=n(32);t.a=r},function(e,t,n){"use strict";function r(e){return e}t.a=r},function(e,t,n){"use strict";function r(e){return null===e||void 0===e||e!==e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return null==e?void 0===e?c:u:s&&s in Object(e)?Object(a.a)(e):Object(o.a)(e)}var i=n(15),a=n(115),o=n(116),u="[object Null]",c="[object Undefined]",s=i.a?i.a.toStringTag:void 0;t.a=r},function(e,t,n){"use strict";var r=n(5),i=r.a.Symbol;t.a=i},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e}t.a=r},function(e,t,n){"use strict";function r(e,t){return e===t||e!==e&&t!==t}t.a=r},function(e,t,n){"use strict";function r(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.a=r},function(e,t,n){"use strict";function r(e){if("string"==typeof e||Object(i.a)(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}var i=n(8),a=1/0;t.a=r},function(e,t,n){"use strict";function r(e,t,n){"__proto__"==t&&i.a?Object(i.a)(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var i=n(67);t.a=r},function(e,t,n){"use strict";function r(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||a.test(e))&&e>-1&&e%1==0&&e<t}var i=9007199254740991,a=/^(?:0|[1-9]\d*)$/;t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}t.a=r},function(e,t,n){"use strict";function r(e,t,n,a,o,u){var c=n;if(!c&&t&&t.length>0){var s=t[0];c=s&&s.loc&&s.loc.source}var f=a;!f&&t&&(f=t.filter(function(e){return Boolean(e.loc)}).map(function(e){return e.loc.start})),f&&0===f.length&&(f=void 0);var l=void 0,p=c;p&&f&&(l=f.map(function(e){return(0,i.getLocation)(p,e)})),Object.defineProperties(this,{message:{value:e,enumerable:!0,writable:!0},locations:{value:l||void 0,enumerable:!0},path:{value:o||void 0,enumerable:!0},nodes:{value:t||void 0},source:{value:c||void 0},positions:{value:f||void 0},originalError:{value:u}}),u&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLError=r;var i=n(35);r.prototype=Object.create(Error.prototype,{constructor:{value:r},name:{value:"GraphQLError"}})},function(e,t,n){"use strict";function r(e){return(0,c.visit)(e,{leave:s})}function i(e,t){return e?e.filter(function(e){return e}).join(t||""):""}function a(e){return e&&0!==e.length?u("{\n"+i(e,"\n"))+"\n}":"{}"}function o(e,t,n){return t?e+t+(n||""):""}function u(e){return e&&e.replace(/\n/g,"\n ")}Object.defineProperty(t,"__esModule",{value:!0}),t.print=r;var c=n(57),s={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return i(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=o("(",i(e.variableDefinitions,", "),")"),a=i(e.directives," "),u=e.selectionSet;return n||a||r||"query"!==t?i([t,i([n,r]),a,u]," "):u},VariableDefinition:function(e){return e.variable+": "+e.type+o(" = ",e.defaultValue)},SelectionSet:function(e){return a(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,a=e.directives,u=e.selectionSet;return i([o("",t,": ")+n+o("(",i(r,", "),")"),i(a," "),u]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+o(" ",i(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return i(["...",o("on ",t),i(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.directives,a=e.selectionSet;return"fragment "+t+" on "+n+" "+o("",i(r," ")," ")+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e){var t=e.value;return JSON.stringify(t)},BooleanValue:function(e){var t=e.value;return JSON.stringify(t)},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+i(e.values,", ")+"]"},ObjectValue:function(e){return"{"+i(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+o("(",i(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:function(e){var t=e.directives,n=e.operationTypes;return i(["schema",i(t," "),a(n)]," ")},OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:function(e){return i(["scalar",e.name,i(e.directives," ")]," ")},ObjectTypeDefinition:function(e){var t=e.name,n=e.interfaces,r=e.directives,u=e.fields;return i(["type",t,o("implements ",i(n,", ")),i(r," "),a(u)]," ")},FieldDefinition:function(e){var t=e.name,n=e.arguments,r=e.type,a=e.directives;return t+o("(",i(n,", "),")")+": "+r+o(" ",i(a," "))},InputValueDefinition:function(e){var t=e.name,n=e.type,r=e.defaultValue,a=e.directives;return i([t+": "+n,o("= ",r),i(a," ")]," ")},InterfaceTypeDefinition:function(e){var t=e.name,n=e.directives,r=e.fields;return i(["interface",t,i(n," "),a(r)]," ")},UnionTypeDefinition:function(e){var t=e.name,n=e.directives,r=e.types;return i(["union",t,i(n," "),"= "+i(r," | ")]," ")},EnumTypeDefinition:function(e){var t=e.name,n=e.directives,r=e.values;return i(["enum",t,i(n," "),a(r)]," ")},EnumValueDefinition:function(e){return i([e.name,i(e.directives," ")]," ")},InputObjectTypeDefinition:function(e){var t=e.name,n=e.directives,r=e.fields;return i(["input",t,i(n," "),a(r)]," ")},TypeExtensionDefinition:function(e){return"extend "+e.definition},DirectiveDefinition:function(e){var t=e.name,n=e.arguments,r=e.locations;return"directive @"+t+o("(",i(n,", "),")")+" on "+i(r," | ")}}},function(e,t,n){"use strict";function r(e){return void 0===e||e!==e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){if(""===e)throw new TypeError("Int cannot represent non 32-bit signed integer value: (empty string)");var t=Number(e);if(t!==t||t>s||t<f)throw new TypeError("Int cannot represent non 32-bit signed integer value: "+String(e));var n=Math.floor(t);if(n!==t)throw new TypeError("Int cannot represent non-integer value: "+String(e));return n}function i(e){if(""===e)throw new TypeError("Float cannot represent non numeric value: (empty string)");var t=Number(e);if(t===t)return t;throw new TypeError("Float cannot represent non numeric value: "+String(e))}function a(e){if(Array.isArray(e))throw new TypeError("String cannot represent an array value: ["+String(e)+"]");return String(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLID=t.GraphQLBoolean=t.GraphQLString=t.GraphQLFloat=t.GraphQLInt=void 0;var o=n(3),u=n(4),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),s=2147483647,f=-2147483648;t.GraphQLInt=new o.GraphQLScalarType({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. ",serialize:r,parseValue:r,parseLiteral:function(e){if(e.kind===c.INT){var t=parseInt(e.value,10);if(t<=s&&t>=f)return t}return null}}),t.GraphQLFloat=new o.GraphQLScalarType({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point). ",serialize:i,parseValue:i,parseLiteral:function(e){return e.kind===c.FLOAT||e.kind===c.INT?parseFloat(e.value):null}}),t.GraphQLString=new o.GraphQLScalarType({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize:a,parseValue:a,parseLiteral:function(e){return e.kind===c.STRING?e.value:null}}),t.GraphQLBoolean=new o.GraphQLScalarType({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:Boolean,parseValue:Boolean,parseLiteral:function(e){return e.kind===c.BOOLEAN?e.value:null}}),t.GraphQLID=new o.GraphQLScalarType({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize:String,parseValue:String,parseLiteral:function(e){return e.kind===c.STRING||e.kind===c.INT?e.value:null}})},function(e,t,n){"use strict";function r(e,t,n){var r=null==e?void 0:Object(i.a)(e,t);return void 0===r?n:r}var i=n(63);t.a=r},function(e,t,n){"use strict";var r=n(7),i=Object(r.a)(Object,"create");t.a=i},function(e,t,n){"use strict";function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var i=n(131),a=n(132),o=n(133),u=n(134),c=n(135);r.prototype.clear=i.a,r.prototype.delete=a.a,r.prototype.get=o.a,r.prototype.has=u.a,r.prototype.set=c.a,t.a=r},function(e,t,n){"use strict";function r(e,t){for(var n=e.length;n--;)if(Object(i.a)(e[n][0],t))return n;return-1}var i=n(17);t.a=r},function(e,t,n){"use strict";function r(e,t){var n=e.__data__;return Object(i.a)(t)?n["string"==typeof t?"string":"hash"]:n.map}var i=n(137);t.a=r},function(e,t,n){"use strict";function r(e){return null!=e&&Object(a.a)(e.length)&&!Object(i.a)(e)}var i=n(65),a=n(49);t.a=r},function(e,t,n){"use strict";function r(e,t,n){if(!Object(u.a)(n))return!1;var r=typeof t;return!!("number"==r?Object(a.a)(n)&&Object(o.a)(t,n.length):"string"==r&&t in n)&&Object(i.a)(n[t],e)}var i=n(17),a=n(32),o=n(21),u=n(9);t.a=r},function(e,t,n){"use strict";function r(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Object(i.a)(t),n=Object(i.a)(n)),e(t,n)}}var i=n(85);t.a=r},function(e,t,n){"use strict";function r(e,t){for(var n=/\r\n|[\n\r]/g,r=1,i=t+1,a=void 0;(a=n.exec(e.body))&&a.index<t;)r+=1,i=t+1-(a.index+a[0].length);return{line:r,column:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocation=r},function(e,t,n){"use strict";function r(e,t){var n=new o(O,0,0,0,0,null);return{source:e,options:t,lastToken:n,token:n,line:1,lineStart:0,advance:i}}function i(){var e=this.lastToken=this.token;if(e.kind!==T){do{e=e.next=c(this,e)}while(e.kind===R);this.token=e}return e}function a(e){var t=e.value;return t?e.kind+' "'+t+'"':e.kind}function o(e,t,n,r,i,a,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,this.prev=a,this.next=null}function u(e){return isNaN(e)?T:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'+("00"+e.toString(16).toUpperCase()).slice(-4)+'"'}function c(e,t){var n=e.source,r=n.body,i=r.length,a=f(r,t.end,e),c=e.line,d=1+a-e.lineStart;if(a>=i)return new o(T,i,i,c,d,t);var y=C.call(r,a);if(y<32&&9!==y&&10!==y&&13!==y)throw(0,m.syntaxError)(n,a,"Cannot contain the invalid character "+u(y)+".");switch(y){case 33:return new o(j,a,a+1,c,d,t);case 35:return l(n,a,c,d,t);case 36:return new o(_,a,a+1,c,d,t);case 40:return new o(N,a,a+1,c,d,t);case 41:return new o(g,a,a+1,c,d,t);case 46:if(46===C.call(r,a+1)&&46===C.call(r,a+2))return new o(E,a,a+3,c,d,t);break;case 58:return new o(L,a,a+1,c,d,t);case 61:return new o(I,a,a+1,c,d,t);case 64:return new o(S,a,a+1,c,d,t);case 91:return new o(w,a,a+1,c,d,t);case 93:return new o(k,a,a+1,c,d,t);case 123:return new o(A,a,a+1,c,d,t);case 124:return new o(D,a,a+1,c,d,t);case 125:return new o(G,a,a+1,c,d,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return b(n,a,c,d,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return p(n,a,y,c,d,t);case 34:return v(n,a,c,d,t)}throw(0,m.syntaxError)(n,a,s(y))}function s(e){return 39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character "+u(e)+"."}function f(e,t,n){for(var r=e.length,i=t;i<r;){var a=C.call(e,i);if(9===a||32===a||44===a||65279===a)++i;else if(10===a)++i,++n.line,n.lineStart=i;else{if(13!==a)break;10===C.call(e,i+1)?i+=2:++i,++n.line,n.lineStart=i}}return i}function l(e,t,n,r,i){var a=e.body,u=void 0,c=t;do{u=C.call(a,++c)}while(null!==u&&(u>31||9===u));return new o(R,t,c,n,r,i,V.call(a,t+1,c))}function p(e,t,n,r,i,a){var c=e.body,s=n,f=t,l=!1;if(45===s&&(s=C.call(c,++f)),48===s){if((s=C.call(c,++f))>=48&&s<=57)throw(0,m.syntaxError)(e,f,"Invalid number, unexpected digit after 0: "+u(s)+".")}else f=d(e,f,s),s=C.call(c,f);return 46===s&&(l=!0,s=C.call(c,++f),f=d(e,f,s),s=C.call(c,f)),69!==s&&101!==s||(l=!0,s=C.call(c,++f),43!==s&&45!==s||(s=C.call(c,++f)),f=d(e,f,s)),new o(l?F:P,t,f,r,i,a,V.call(c,t,f))}function d(e,t,n){var r=e.body,i=t,a=n;if(a>=48&&a<=57){do{a=C.call(r,++i)}while(a>=48&&a<=57);return i}throw(0,m.syntaxError)(e,i,"Invalid number, expected digit but got: "+u(a)+".")}function v(e,t,n,r,i){for(var a=e.body,c=t+1,s=c,f=0,l="";c<a.length&&null!==(f=C.call(a,c))&&10!==f&&13!==f&&34!==f;){if(f<32&&9!==f)throw(0,m.syntaxError)(e,c,"Invalid character within String: "+u(f)+".");if(++c,92===f){switch(l+=V.call(a,s,c-1),f=C.call(a,c)){case 34:l+='"';break;case 47:l+="/";break;case 92:l+="\\";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+="\n";break;case 114:l+="\r";break;case 116:l+="\t";break;case 117:var p=y(C.call(a,c+1),C.call(a,c+2),C.call(a,c+3),C.call(a,c+4));if(p<0)throw(0,m.syntaxError)(e,c,"Invalid character escape sequence: \\u"+a.slice(c+1,c+5)+".");l+=String.fromCharCode(p),c+=4;break;default:throw(0,m.syntaxError)(e,c,"Invalid character escape sequence: \\"+String.fromCharCode(f)+".")}++c,s=c}}if(34!==f)throw(0,m.syntaxError)(e,c,"Unterminated string.");return l+=V.call(a,s,c),new o(M,t,c+1,n,r,i,l)}function y(e,t,n,r){return h(e)<<12|h(t)<<8|h(n)<<4|h(r)}function h(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function b(e,t,n,r,i){for(var a=e.body,u=a.length,c=t+1,s=0;c!==u&&null!==(s=C.call(a,c))&&(95===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122);)++c;return new o(Q,t,c,n,r,i,V.call(a,t,c))}Object.defineProperty(t,"__esModule",{value:!0}),t.TokenKind=void 0,t.createLexer=r,t.getTokenDesc=a;var m=n(37),O="<SOF>",T="<EOF>",j="!",_="$",N="(",g=")",E="...",L=":",I="=",S="@",w="[",k="]",A="{",D="|",G="}",Q="Name",P="Int",F="Float",M="String",R="Comment",C=(t.TokenKind={SOF:O,EOF:T,BANG:j,DOLLAR:_,PAREN_L:N,PAREN_R:g,SPREAD:E,COLON:L,EQUALS:I,AT:S,BRACKET_L:w,BRACKET_R:k,BRACE_L:A,PIPE:D,BRACE_R:G,NAME:Q,INT:P,FLOAT:F,STRING:M,COMMENT:R},String.prototype.charCodeAt),V=String.prototype.slice;o.prototype.toJSON=o.prototype.inspect=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23);Object.defineProperty(t,"GraphQLError",{enumerable:!0,get:function(){return r.GraphQLError}});var i=n(100);Object.defineProperty(t,"syntaxError",{enumerable:!0,get:function(){return i.syntaxError}});var a=n(101);Object.defineProperty(t,"locatedError",{enumerable:!0,get:function(){return a.locatedError}});var o=n(102);Object.defineProperty(t,"formatError",{enumerable:!0,get:function(){return o.formatError}})},function(e,t,n){"use strict";function r(e,t){return e.reduce(function(e,n){return e[t(n)]=n,e},Object.create(null))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t){function n(e){return!!o(e)}function r(e){var t=null!=e&&e.length;return"number"==typeof t&&t>=0&&t%1==0}function i(e){return Object(e)===e&&(r(e)||n(e))}function a(e){var t=o(e);if(t)return t.call(e)}function o(e){if(null!=e){var t=h&&e[h]||e["@@iterator"];if("function"==typeof t)return t}}function u(e){if(null!=e){var t=a(e);if(t)return t;if(r(e))return new c(e)}}function c(e){this._o=e,this._i=0}function s(e,t,n){if(null!=e){if("function"==typeof e.forEach)return e.forEach(t,n);var i=0,o=a(e);if(o){for(var u;!(u=o.next()).done;)if(t.call(n,u.value,i++,e),i>9999999)throw new TypeError("Near-infinite iteration.")}else if(r(e))for(;i<e.length;i++)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}}function f(e){return!!p(e)}function l(e){var t=p(e);if(t)return t.call(e)}function p(e){if(null!=e){var t=m&&e[m]||e["@@asyncIterator"];if("function"==typeof t)return t}}function d(e){if(null!=e){var t=l(e);if(t)return t;var n=u(e);if(n)return new v(n)}}function v(e){this._i=e}function y(e,t,n){var r=d(e);if(r){var i=0;return new Promise(function(a,o){function u(){return r.next().then(function(r){r.done?a():Promise.resolve(t.call(n,r.value,i++,e)).then(u).catch(o)}).catch(o)}u()})}}var h="function"==typeof Symbol&&Symbol.iterator,b=h||"@@iterator";t.$$iterator=b,t.isIterable=n,t.isArrayLike=r,t.isCollection=i,t.getIterator=a,t.getIteratorMethod=o,t.createIterator=u,c.prototype[b]=function(){return this},c.prototype.next=function(){return void 0===this._o||this._i>=this._o.length?(this._o=void 0,{value:void 0,done:!0}):{value:this._o[this._i++],done:!1}},t.forEach=s;var m="function"==typeof Symbol&&Symbol.asyncIterator,O=m||"@@asyncIterator";t.$$asyncIterator=O,t.isAsyncIterable=f,t.getAsyncIterator=l,t.getAsyncIteratorMethod=p,t.createAsyncIterator=d,v.prototype[O]=function(){return this},v.prototype.next=function(){var e=this._i.next();return Promise.resolve(e.value).then(function(t){return{value:t,done:e.done}})},t.forAwaitEach=y},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.specifiedDirectives=t.GraphQLDeprecatedDirective=t.DEFAULT_DEPRECATION_REASON=t.GraphQLSkipDirective=t.GraphQLIncludeDirective=t.GraphQLDirective=t.DirectiveLocation=void 0;var i=n(3),a=n(26),o=n(2),u=function(e){return e&&e.__esModule?e:{default:e}}(o),c=n(59),s=t.DirectiveLocation={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"},f=t.GraphQLDirective=function e(t){r(this,e),t.name||(0,u.default)(0,"Directive must be named."),(0,c.assertValidName)(t.name),Array.isArray(t.locations)||(0,u.default)(0,"Must provide locations for directive."),this.name=t.name,this.description=t.description,this.locations=t.locations,this.astNode=t.astNode;var n=t.args;n?(Array.isArray(n)&&(0,u.default)(0,"@"+t.name+" args must be an object with argument names as keys."),this.args=Object.keys(n).map(function(e){(0,c.assertValidName)(e);var r=n[e];return(0,i.isInputType)(r.type)||(0,u.default)(0,"@"+t.name+"("+e+":) argument type must be Input Type but got: "+String(r.type)+"."),{name:e,description:void 0===r.description?null:r.description,type:r.type,defaultValue:r.defaultValue,astNode:r.astNode}})):this.args=[]},l=t.GraphQLIncludeDirective=new f({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[s.FIELD,s.FRAGMENT_SPREAD,s.INLINE_FRAGMENT],args:{if:{type:new i.GraphQLNonNull(a.GraphQLBoolean),description:"Included when true."}}}),p=t.GraphQLSkipDirective=new f({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[s.FIELD,s.FRAGMENT_SPREAD,s.INLINE_FRAGMENT],args:{if:{type:new i.GraphQLNonNull(a.GraphQLBoolean),description:"Skipped when true."}}}),d=t.DEFAULT_DEPRECATION_REASON="No longer supported",v=t.GraphQLDeprecatedDirective=new f({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[s.FIELD_DEFINITION,s.ENUM_VALUE],args:{reason:{type:a.GraphQLString,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).",defaultValue:d}}});t.specifiedDirectives=[l,p,v]},function(e,t,n){"use strict";function r(e,t){return Object(i.a)(e)?e:Object(a.a)(e,t)?[e]:Object(o.a)(Object(u.a)(e))}var i=n(0),a=n(42),o=n(117),u=n(45);t.a=r},function(e,t,n){"use strict";function r(e,t){if(Object(i.a)(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Object(a.a)(e))||(u.test(e)||!o.test(e)||null!=t&&e in Object(t))}var i=n(0),a=n(8),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;t.a=r},function(e,t,n){"use strict";function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var i=n(120),a=n(136),o=n(138),u=n(139),c=n(140);r.prototype.clear=i.a,r.prototype.delete=a.a,r.prototype.get=o.a,r.prototype.has=u.a,r.prototype.set=c.a,t.a=r},function(e,t,n){"use strict";var r=n(7),i=n(5),a=Object(r.a)(i.a,"Map");t.a=a},function(e,t,n){"use strict";function r(e){return null==e?"":Object(i.a)(e)}var i=n(46);t.a=r},function(e,t,n){"use strict";function r(e){if("string"==typeof e)return e;if(Object(o.a)(e))return Object(a.a)(e,r)+"";if(Object(u.a)(e))return f?f.call(e):"";var t=e+"";return"0"==t&&1/e==-c?"-0":t}var i=n(15),a=n(18),o=n(0),u=n(8),c=1/0,s=i.a?i.a.prototype:void 0,f=s?s.toString:void 0;t.a=r},function(e,t,n){"use strict";function r(e,t){return e&&Object(i.a)(e,t,a.a)}var i=n(147),a=n(11);t.a=r},function(e,t,n){"use strict";var r=n(151),i=n(16),a=Object.prototype,o=a.hasOwnProperty,u=a.propertyIsEnumerable,c=Object(r.a)(function(){return arguments}())?r.a:function(e){return Object(i.a)(e)&&o.call(e,"callee")&&!u.call(e,"callee")};t.a=c},function(e,t,n){"use strict";function r(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}var i=9007199254740991;t.a=r},function(e,t,n){"use strict";function r(e,t){return function(n,r){var c=Object(u.a)(n)?i.a:a.a,s=t?t():{};return c(n,e,Object(o.a)(r,2),s)}}var i=n(161),a=n(162),o=n(1),u=n(0);t.a=r},function(e,t,n){"use strict";function r(e,t,n,o,u){return e===t||(null==e||null==t||!Object(a.a)(e)&&!Object(a.a)(t)?e!==e&&t!==t:Object(i.a)(e,t,n,o,r,u))}var i=n(170),a=n(16);t.a=r},function(e,t,n){"use strict";function r(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.a=r},function(e,t,n){"use strict";function r(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.a=r},function(e,t,n){"use strict";function r(e,t,n,o,u){var c=-1,s=e.length;for(n||(n=a.a),u||(u=[]);++c<s;){var f=e[c];t>0&&n(f)?t>1?r(f,t-1,n,o,u):Object(i.a)(u,f):o||(u[u.length]=f)}return u}var i=n(79),a=n(212);t.a=r},function(e,t,n){"use strict";function r(e,t){var n="string"==typeof e?new ae.Source(e):e;if(!(n instanceof ae.Source))throw new TypeError("Must provide Source. Received: "+String(n));return u((0,ue.createLexer)(n,t||{}))}function i(e,t){var n="string"==typeof e?new ae.Source(e):e,r=(0,ue.createLexer)(n,t||{});ee(r,ue.TokenKind.SOF);var i=_(r,!1);return ee(r,ue.TokenKind.EOF),i}function a(e,t){var n="string"==typeof e?new ae.Source(e):e,r=(0,ue.createLexer)(n,t||{});ee(r,ue.TokenKind.SOF);var i=k(r);return ee(r,ue.TokenKind.EOF),i}function o(e){var t=ee(e,ue.TokenKind.NAME);return{kind:ce.NAME,value:t.value,loc:W(e,t)}}function u(e){var t=e.token;ee(e,ue.TokenKind.SOF);var n=[];do{n.push(c(e))}while(!X(e,ue.TokenKind.EOF));return{kind:ce.DOCUMENT,definitions:n,loc:W(e,t)}}function c(e){if(Z(e,ue.TokenKind.BRACE_L))return s(e);if(Z(e,ue.TokenKind.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return s(e);case"fragment":return T(e);case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"extend":case"directive":return D(e)}throw ne(e)}function s(e){var t=e.token;if(Z(e,ue.TokenKind.BRACE_L))return{kind:ce.OPERATION_DEFINITION,operation:"query",name:null,variableDefinitions:null,directives:[],selectionSet:v(e),loc:W(e,t)};var n=f(e),r=void 0;return Z(e,ue.TokenKind.NAME)&&(r=o(e)),{kind:ce.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:l(e),directives:S(e),selectionSet:v(e),loc:W(e,t)}}function f(e){var t=ee(e,ue.TokenKind.NAME);switch(t.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw ne(e,t)}function l(e){return Z(e,ue.TokenKind.PAREN_L)?ie(e,ue.TokenKind.PAREN_L,p,ue.TokenKind.PAREN_R):[]}function p(e){var t=e.token;return{kind:ce.VARIABLE_DEFINITION,variable:d(e),type:(ee(e,ue.TokenKind.COLON),k(e)),defaultValue:X(e,ue.TokenKind.EQUALS)?_(e,!0):null,loc:W(e,t)}}function d(e){var t=e.token;return ee(e,ue.TokenKind.DOLLAR),{kind:ce.VARIABLE,name:o(e),loc:W(e,t)}}function v(e){var t=e.token;return{kind:ce.SELECTION_SET,selections:ie(e,ue.TokenKind.BRACE_L,y,ue.TokenKind.BRACE_R),loc:W(e,t)}}function y(e){return Z(e,ue.TokenKind.SPREAD)?O(e):h(e)}function h(e){var t=e.token,n=o(e),r=void 0,i=void 0;return X(e,ue.TokenKind.COLON)?(r=n,i=o(e)):(r=null,i=n),{kind:ce.FIELD,alias:r,name:i,arguments:b(e),directives:S(e),selectionSet:Z(e,ue.TokenKind.BRACE_L)?v(e):null,loc:W(e,t)}}function b(e){return Z(e,ue.TokenKind.PAREN_L)?ie(e,ue.TokenKind.PAREN_L,m,ue.TokenKind.PAREN_R):[]}function m(e){var t=e.token;return{kind:ce.ARGUMENT,name:o(e),value:(ee(e,ue.TokenKind.COLON),_(e,!1)),loc:W(e,t)}}function O(e){var t=e.token;if(ee(e,ue.TokenKind.SPREAD),Z(e,ue.TokenKind.NAME)&&"on"!==e.token.value)return{kind:ce.FRAGMENT_SPREAD,name:j(e),directives:S(e),loc:W(e,t)};var n=null;return"on"===e.token.value&&(e.advance(),n=A(e)),{kind:ce.INLINE_FRAGMENT,typeCondition:n,directives:S(e),selectionSet:v(e),loc:W(e,t)}}function T(e){var t=e.token;return te(e,"fragment"),{kind:ce.FRAGMENT_DEFINITION,name:j(e),typeCondition:(te(e,"on"),A(e)),directives:S(e),selectionSet:v(e),loc:W(e,t)}}function j(e){if("on"===e.token.value)throw ne(e);return o(e)}function _(e,t){var n=e.token;switch(n.kind){case ue.TokenKind.BRACKET_L:return E(e,t);case ue.TokenKind.BRACE_L:return L(e,t);case ue.TokenKind.INT:return e.advance(),{kind:ce.INT,value:n.value,loc:W(e,n)};case ue.TokenKind.FLOAT:return e.advance(),{kind:ce.FLOAT,value:n.value,loc:W(e,n)};case ue.TokenKind.STRING:return e.advance(),{kind:ce.STRING,value:n.value,loc:W(e,n)};case ue.TokenKind.NAME:return"true"===n.value||"false"===n.value?(e.advance(),{kind:ce.BOOLEAN,value:"true"===n.value,loc:W(e,n)}):"null"===n.value?(e.advance(),{kind:ce.NULL,loc:W(e,n)}):(e.advance(),{kind:ce.ENUM,value:n.value,loc:W(e,n)});case ue.TokenKind.DOLLAR:if(!t)return d(e)}throw ne(e)}function N(e){return _(e,!0)}function g(e){return _(e,!1)}function E(e,t){var n=e.token,r=t?N:g;return{kind:ce.LIST,values:re(e,ue.TokenKind.BRACKET_L,r,ue.TokenKind.BRACKET_R),loc:W(e,n)}}function L(e,t){var n=e.token;ee(e,ue.TokenKind.BRACE_L);for(var r=[];!X(e,ue.TokenKind.BRACE_R);)r.push(I(e,t));return{kind:ce.OBJECT,fields:r,loc:W(e,n)}}function I(e,t){var n=e.token;return{kind:ce.OBJECT_FIELD,name:o(e),value:(ee(e,ue.TokenKind.COLON),_(e,t)),loc:W(e,n)}}function S(e){for(var t=[];Z(e,ue.TokenKind.AT);)t.push(w(e));return t}function w(e){var t=e.token;return ee(e,ue.TokenKind.AT),{kind:ce.DIRECTIVE,name:o(e),arguments:b(e),loc:W(e,t)}}function k(e){var t=e.token,n=void 0;return X(e,ue.TokenKind.BRACKET_L)?(n=k(e),ee(e,ue.TokenKind.BRACKET_R),n={kind:ce.LIST_TYPE,type:n,loc:W(e,t)}):n=A(e),X(e,ue.TokenKind.BANG)?{kind:ce.NON_NULL_TYPE,type:n,loc:W(e,t)}:n}function A(e){var t=e.token;return{kind:ce.NAMED_TYPE,name:o(e),loc:W(e,t)}}function D(e){if(Z(e,ue.TokenKind.NAME))switch(e.token.value){case"schema":return G(e);case"scalar":return P(e);case"type":return F(e);case"interface":return U(e);case"union":return x(e);case"enum":return K(e);case"input":return q(e);case"extend":return Y(e);case"directive":return z(e)}throw ne(e)}function G(e){var t=e.token;te(e,"schema");var n=S(e),r=ie(e,ue.TokenKind.BRACE_L,Q,ue.TokenKind.BRACE_R);return{kind:ce.SCHEMA_DEFINITION,directives:n,operationTypes:r,loc:W(e,t)}}function Q(e){var t=e.token,n=f(e);ee(e,ue.TokenKind.COLON);var r=A(e);return{kind:ce.OPERATION_TYPE_DEFINITION,operation:n,type:r,loc:W(e,t)}}function P(e){var t=e.token;te(e,"scalar");var n=o(e),r=S(e);return{kind:ce.SCALAR_TYPE_DEFINITION,name:n,directives:r,loc:W(e,t)}}function F(e){var t=e.token;te(e,"type");var n=o(e),r=M(e),i=S(e),a=re(e,ue.TokenKind.BRACE_L,R,ue.TokenKind.BRACE_R);return{kind:ce.OBJECT_TYPE_DEFINITION,name:n,interfaces:r,directives:i,fields:a,loc:W(e,t)}}function M(e){var t=[];if("implements"===e.token.value){e.advance();do{t.push(A(e))}while(Z(e,ue.TokenKind.NAME))}return t}function R(e){var t=e.token,n=o(e),r=C(e);ee(e,ue.TokenKind.COLON);var i=k(e),a=S(e);return{kind:ce.FIELD_DEFINITION,name:n,arguments:r,type:i,directives:a,loc:W(e,t)}}function C(e){return Z(e,ue.TokenKind.PAREN_L)?ie(e,ue.TokenKind.PAREN_L,V,ue.TokenKind.PAREN_R):[]}function V(e){var t=e.token,n=o(e);ee(e,ue.TokenKind.COLON);var r=k(e),i=null;X(e,ue.TokenKind.EQUALS)&&(i=N(e));var a=S(e);return{kind:ce.INPUT_VALUE_DEFINITION,name:n,type:r,defaultValue:i,directives:a,loc:W(e,t)}}function U(e){var t=e.token;te(e,"interface");var n=o(e),r=S(e),i=re(e,ue.TokenKind.BRACE_L,R,ue.TokenKind.BRACE_R);return{kind:ce.INTERFACE_TYPE_DEFINITION,name:n,directives:r,fields:i,loc:W(e,t)}}function x(e){var t=e.token;te(e,"union");var n=o(e),r=S(e);ee(e,ue.TokenKind.EQUALS);var i=B(e);return{kind:ce.UNION_TYPE_DEFINITION,name:n,directives:r,types:i,loc:W(e,t)}}function B(e){X(e,ue.TokenKind.PIPE);var t=[];do{t.push(A(e))}while(X(e,ue.TokenKind.PIPE));return t}function K(e){var t=e.token;te(e,"enum");var n=o(e),r=S(e),i=ie(e,ue.TokenKind.BRACE_L,J,ue.TokenKind.BRACE_R);return{kind:ce.ENUM_TYPE_DEFINITION,name:n,directives:r,values:i,loc:W(e,t)}}function J(e){var t=e.token,n=o(e),r=S(e);return{kind:ce.ENUM_VALUE_DEFINITION,name:n,directives:r,loc:W(e,t)}}function q(e){var t=e.token;te(e,"input");var n=o(e),r=S(e),i=re(e,ue.TokenKind.BRACE_L,V,ue.TokenKind.BRACE_R);return{kind:ce.INPUT_OBJECT_TYPE_DEFINITION,name:n,directives:r,fields:i,loc:W(e,t)}}function Y(e){var t=e.token;te(e,"extend");var n=F(e);return{kind:ce.TYPE_EXTENSION_DEFINITION,definition:n,loc:W(e,t)}}function z(e){var t=e.token;te(e,"directive"),ee(e,ue.TokenKind.AT);var n=o(e),r=C(e);te(e,"on");var i=$(e);return{kind:ce.DIRECTIVE_DEFINITION,name:n,arguments:r,locations:i,loc:W(e,t)}}function $(e){X(e,ue.TokenKind.PIPE);var t=[];do{t.push(o(e))}while(X(e,ue.TokenKind.PIPE));return t}function W(e,t){if(!e.options.noLocation)return new H(t,e.lastToken,e.source)}function H(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}function Z(e,t){return e.token.kind===t}function X(e,t){var n=e.token.kind===t;return n&&e.advance(),n}function ee(e,t){var n=e.token;if(n.kind===t)return e.advance(),n;throw(0,oe.syntaxError)(e.source,n.start,"Expected "+t+", found "+(0,ue.getTokenDesc)(n))}function te(e,t){var n=e.token;if(n.kind===ue.TokenKind.NAME&&n.value===t)return e.advance(),n;throw(0,oe.syntaxError)(e.source,n.start,'Expected "'+t+'", found '+(0,ue.getTokenDesc)(n))}function ne(e,t){var n=t||e.token;return(0,oe.syntaxError)(e.source,n.start,"Unexpected "+(0,ue.getTokenDesc)(n))}function re(e,t,n,r){ee(e,t);for(var i=[];!X(e,r);)i.push(n(e));return i}function ie(e,t,n,r){ee(e,t);for(var i=[n(e)];!X(e,r);)i.push(n(e));return i}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=r,t.parseValue=i,t.parseType=a,t.parseConstValue=N,t.parseTypeReference=k,t.parseNamedType=A;var ae=n(56),oe=n(37),ue=n(36),ce=n(4);H.prototype.toJSON=H.prototype.inspect=function(){return{start:this.start,end:this.end}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Source=void 0;var i=n(2),a=function(e){return e&&e.__esModule?e:{default:e}}(i);t.Source=function e(t,n,i){r(this,e),this.body=t,this.name=n||"GraphQL request",this.locationOffset=i||{line:1,column:1},this.locationOffset.line>0||(0,a.default)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||(0,a.default)(0,"column in locationOffset is 1-indexed and must be positive")}},function(e,t,n){"use strict";function r(e,t,n){var r=n||c,a=void 0,o=Array.isArray(e),f=[e],l=-1,p=[],d=void 0,v=[],y=[],h=e;do{l++;var b=l===f.length,m=void 0,O=void 0,T=b&&0!==p.length;if(b){if(m=0===y.length?void 0:v.pop(),O=d,d=y.pop(),T){if(o)O=O.slice();else{var j={};for(var _ in O)O.hasOwnProperty(_)&&(j[_]=O[_]);O=j}for(var N=0,g=0;g<p.length;g++){var E=p[g][0],L=p[g][1];o&&(E-=N),o&&null===L?(O.splice(E,1),N++):O[E]=L}}l=a.index,f=a.keys,p=a.edits,o=a.inArray,a=a.prev}else{if(m=d?o?l:f[l]:void 0,null===(O=d?d[m]:h)||void 0===O)continue;d&&v.push(m)}var I=void 0;if(!Array.isArray(O)){if(!i(O))throw new Error("Invalid AST Node: "+JSON.stringify(O));var S=u(t,O.kind,b);if(S){if((I=S.call(t,O,m,d,v,y))===s)break;if(!1===I){if(!b){v.pop();continue}}else if(void 0!==I&&(p.push([m,I]),!b)){if(!i(I)){v.pop();continue}O=I}}}void 0===I&&T&&p.push([m,O]),b||(a={inArray:o,index:l,keys:f,edits:p,prev:a},o=Array.isArray(O),f=o?O:r[O.kind]||[],l=-1,p=[],d&&y.push(d),d=O)}while(void 0!==a);return 0!==p.length&&(h=p[p.length-1][1]),h}function i(e){return e&&"string"==typeof e.kind}function a(e){var t=new Array(e.length);return{enter:function(n){for(var r=0;r<e.length;r++)if(!t[r]){var i=u(e[r],n.kind,!1);if(i){var a=i.apply(e[r],arguments);if(!1===a)t[r]=n;else if(a===s)t[r]=s;else if(void 0!==a)return a}}},leave:function(n){for(var r=0;r<e.length;r++)if(t[r])t[r]===n&&(t[r]=null);else{var i=u(e[r],n.kind,!0);if(i){var a=i.apply(e[r],arguments);if(a===s)t[r]=s;else if(void 0!==a&&!1!==a)return a}}}}}function o(e,t){return{enter:function(n){e.enter(n);var r=u(t,n.kind,!1);if(r){var a=r.apply(t,arguments);return void 0!==a&&(e.leave(n),i(a)&&e.enter(a)),a}},leave:function(n){var r=u(t,n.kind,!0),i=void 0;return r&&(i=r.apply(t,arguments)),e.leave(n),i}}}function u(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var a=n?e.leave:e.enter;if(a){if("function"==typeof a)return a;var o=a[t];if("function"==typeof o)return o}}}Object.defineProperty(t,"__esModule",{value:!0}),t.visit=r,t.visitInParallel=a,t.visitWithTypeInfo=o,t.getVisitFn=u;var c=t.QueryDocumentKeys={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["name","directives"],ObjectTypeDefinition:["name","interfaces","directives","fields"],FieldDefinition:["name","arguments","type","directives"],InputValueDefinition:["name","type","defaultValue","directives"],InterfaceTypeDefinition:["name","directives","fields"],UnionTypeDefinition:["name","directives","types"],EnumTypeDefinition:["name","directives","values"],EnumValueDefinition:["name","directives"],InputObjectTypeDefinition:["name","directives","fields"],TypeExtensionDefinition:["definition"],DirectiveDefinition:["name","arguments","locations"]},s=t.BREAK={}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){if(e){if(t instanceof h.GraphQLNonNull){if(e.kind===y.NULL)return;return i(e,t.ofType,n)}if(e.kind===y.NULL)return null;if(e.kind===y.VARIABLE){var r=e.name.value;if(!n||(0,d.default)(n[r]))return;return n[r]}if(t instanceof h.GraphQLList){var o=t.ofType;if(e.kind===y.LIST){for(var c=[],f=e.values,p=0;p<f.length;p++)if(a(f[p],n)){if(o instanceof h.GraphQLNonNull)return;c.push(null)}else{var v=i(f[p],o,n);if((0,d.default)(v))return;c.push(v)}return c}var b=i(e,o,n);if((0,d.default)(b))return;return[b]}if(t instanceof h.GraphQLInputObjectType){if(e.kind!==y.OBJECT)return;for(var m=Object.create(null),O=t.getFields(),T=(0,u.default)(e.fields,function(e){return e.name.value}),j=Object.keys(O),_=0;_<j.length;_++){var N=j[_],g=O[N],E=T[N];if(E&&!a(E.value,n)){var L=i(E.value,g.type,n);if((0,d.default)(L))return;m[N]=L}else if((0,d.default)(g.defaultValue)){if(g.type instanceof h.GraphQLNonNull)return}else m[N]=g.defaultValue}return m}t instanceof h.GraphQLScalarType||t instanceof h.GraphQLEnumType||(0,s.default)(0,"Must be input type");var I=t.parseLiteral(e);if(!(0,l.default)(I)||t.isValidLiteral(e))return I}}function a(e,t){return e.kind===y.VARIABLE&&(!t||(0,d.default)(t[e.name.value]))}Object.defineProperty(t,"__esModule",{value:!0}),t.valueFromAST=i;var o=n(38),u=r(o),c=n(2),s=r(c),f=n(13),l=r(f),p=n(25),d=r(p),v=n(4),y=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(v),h=n(3)},function(e,t,n){"use strict";(function(e){function n(e,t){if(!e||"string"!=typeof e)throw new Error("Must be named. Unexpected name: "+e+".");if(!t&&!u&&!o&&"__"===e.slice(0,2)&&(u=!0,console&&console.warn)){var n=new Error('Name "'+e+'" must not begin with "__", which is reserved by GraphQL introspection. In a future release of graphql this will become a hard error.');console.warn(r(n))}if(!i.test(e))throw new Error('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'+e+'" does not.')}function r(e){var t="",n=String(e).replace(a,""),r=e.stack;return r&&(t=r.replace(a,"")),-1===t.indexOf(n)&&(t=n+"\n"+t),t.trim()}Object.defineProperty(t,"__esModule",{value:!0}),t.assertValidName=n,t.formatWarning=r;var i=/^[_a-zA-Z][_a-zA-Z0-9]*$/,a=/^Error: /,o=Boolean(e&&e.env&&e.env.GRAPHQL_NO_NAME_WARNING),u=!1}).call(t,n(107))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){for(var r={},i=0;i<t.length;i++){var a=t[i],o=a.variable.name.value,c=(0,j.typeFromAST)(e,a.type);if(!(0,S.isInputType)(c))throw new f.GraphQLError('Variable "$'+o+'" expected value of type "'+(0,I.print)(a.type)+'" which cannot be used as an input type.',[a.type]);var s=n[o];if((0,m.default)(s)){var l=a.defaultValue;if(l&&(r[o]=(0,_.valueFromAST)(l,c)),c instanceof S.GraphQLNonNull)throw new f.GraphQLError('Variable "$'+o+'" of required type "'+String(c)+'" was not provided.',[a])}else{var p=(0,N.isValidJSValue)(s,c);if(p.length){var d=p?"\n"+p.join("\n"):"";throw new f.GraphQLError('Variable "$'+o+'" got invalid value '+JSON.stringify(s)+"."+d,[a])}var y=u(c,s);(0,m.default)(y)&&(0,v.default)(0,"Should have reported error."),r[o]=y}}return r}function a(e,t,n){var r={},i=e.args,a=t.arguments;if(!i||!a)return r;for(var o=(0,T.default)(a,function(e){return e.name.value}),u=0;u<i.length;u++){var c=i[u],s=c.name,l=c.type,p=o[s],d=c.defaultValue;if(p)if(p.value.kind===L.VARIABLE){var v=p.value.name.value;if(n&&Object.prototype.hasOwnProperty.call(n,v)&&!(0,m.default)(n[v]))r[s]=n[v];else if((0,m.default)(d)){if(l instanceof S.GraphQLNonNull)throw new f.GraphQLError('Argument "'+s+'" of required type "'+String(l)+'" was provided the variable "$'+v+'" which was not provided a runtime value.',[p.value])}else r[s]=d}else{var y=p.value,h=(0,_.valueFromAST)(y,l,n);if((0,m.default)(h)){var b=(0,g.isValidLiteralValue)(l,y),O=b?"\n"+b.join("\n"):"";throw new f.GraphQLError('Argument "'+s+'" got invalid value '+(0,I.print)(y)+"."+O,[p.value])}r[s]=h}else if((0,m.default)(d)){if(l instanceof S.GraphQLNonNull)throw new f.GraphQLError('Argument "'+s+'" of required type "'+String(l)+'" was not provided.',[t])}else r[s]=d}return r}function o(e,t,n){var r=t.directives&&(0,p.default)(t.directives,function(t){return t.name.value===e.name});if(r)return a(e,r,n)}function u(e,t){var n=t;if(!(0,m.default)(n)){if(e instanceof S.GraphQLNonNull){if(null===n)return;return u(e.ofType,n)}if(null===n)return null;if(e instanceof S.GraphQLList){var r=e.ofType;if((0,s.isCollection)(n)){var i=[],a=(0,s.createIterator)(n);if(!a)return;for(var o=void 0;!(o=a.next()).done;){var f=u(r,o.value);if((0,m.default)(f))return;i.push(f)}return i}var l=u(r,n);if((0,m.default)(l))return;return[u(r,n)]}if(e instanceof S.GraphQLInputObjectType){if("object"!==(void 0===n?"undefined":c(n)))return;for(var p=Object.create(null),d=e.getFields(),y=Object.keys(d),b=0;b<y.length;b++){var O=y[b],T=d[O];if((0,m.default)(n[O]))if((0,m.default)(T.defaultValue)){if(T.type instanceof S.GraphQLNonNull)return}else p[O]=T.defaultValue;else{var j=u(T.type,n[O]);if((0,m.default)(j))return;p[O]=j}}return p}e instanceof S.GraphQLScalarType||e instanceof S.GraphQLEnumType||(0,v.default)(0,"Must be input type");var _=e.parseValue(n);if(!(0,h.default)(_))return _}}Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.getVariableValues=i,t.getArgumentValues=a,t.getDirectiveValues=o,t.coerceValue=u;var s=n(39),f=n(37),l=n(61),p=r(l),d=n(2),v=r(d),y=n(13),h=r(y),b=n(25),m=r(b),O=n(38),T=r(O),j=n(108),_=n(58),N=n(109),g=n(110),E=n(4),L=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(E),I=n(24),S=n(3)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeNameMetaFieldDef=t.TypeMetaFieldDef=t.SchemaMetaFieldDef=t.__TypeKind=t.TypeKind=t.__EnumValue=t.__InputValue=t.__Field=t.__Type=t.__DirectiveLocation=t.__Directive=t.__Schema=void 0;var r=n(25),i=function(e){return e&&e.__esModule?e:{default:e}}(r),a=n(112),o=n(24),u=n(3),c=n(26),s=n(40),f=t.__Schema=new u.GraphQLObjectType({name:"__Schema",isIntrospection:!0,description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{types:{description:"A list of all types supported by this server.",type:new u.GraphQLNonNull(new u.GraphQLList(new u.GraphQLNonNull(d))),resolve:function(e){var t=e.getTypeMap();return Object.keys(t).map(function(e){return t[e]})}},queryType:{description:"The type that query operations will be rooted at.",type:new u.GraphQLNonNull(d),resolve:function(e){return e.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:d,resolve:function(e){return e.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:d,resolve:function(e){return e.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new u.GraphQLNonNull(new u.GraphQLList(new u.GraphQLNonNull(l))),resolve:function(e){return e.getDirectives()}}}}}),l=t.__Directive=new u.GraphQLObjectType({name:"__Directive",isIntrospection:!0,description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:function(){return{name:{type:new u.GraphQLNonNull(c.GraphQLString)},description:{type:c.GraphQLString},locations:{type:new u.GraphQLNonNull(new u.GraphQLList(new u.GraphQLNonNull(p)))},args:{type:new u.GraphQLNonNull(new u.GraphQLList(new u.GraphQLNonNull(y))),resolve:function(e){return e.args||[]}},onOperation:{deprecationReason:"Use `locations`.",type:new u.GraphQLNonNull(c.GraphQLBoolean),resolve:function(e){return-1!==e.locations.indexOf(s.DirectiveLocation.QUERY)||-1!==e.locations.indexOf(s.DirectiveLocation.MUTATION)||-1!==e.locations.indexOf(s.DirectiveLocation.SUBSCRIPTION)}},onFragment:{deprecationReason:"Use `locations`.",type:new u.GraphQLNonNull(c.GraphQLBoolean),resolve:function(e){return-1!==e.locations.indexOf(s.DirectiveLocation.FRAGMENT_SPREAD)||-1!==e.locations.indexOf(s.DirectiveLocation.INLINE_FRAGMENT)||-1!==e.locations.indexOf(s.DirectiveLocation.FRAGMENT_DEFINITION)}},onField:{deprecationReason:"Use `locations`.",type:new u.GraphQLNonNull(c.GraphQLBoolean),resolve:function(e){return-1!==e.locations.indexOf(s.DirectiveLocation.FIELD)}}}}}),p=t.__DirectiveLocation=new u.GraphQLEnumType({name:"__DirectiveLocation",isIntrospection:!0,description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:s.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:s.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:s.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:s.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:s.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:s.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:s.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},SCHEMA:{value:s.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:s.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:s.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:s.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:s.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:s.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:s.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:s.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:s.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:s.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:s.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),d=t.__Type=new u.GraphQLObjectType({name:"__Type",isIntrospection:!0,description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new u.GraphQLNonNull(m),resolve:function(e){if(e instanceof u.GraphQLScalarType)return b.SCALAR;if(e instanceof u.GraphQLObjectType)return b.OBJECT;if(e instanceof u.GraphQLInterfaceType)return b.INTERFACE;if(e instanceof u.GraphQLUnionType)return b.UNION;if(e instanceof u.GraphQLEnumType)return b.ENUM;if(e instanceof u.GraphQLInputObjectType)return b.INPUT_OBJECT;if(e instanceof u.GraphQLList)return b.LIST;if(e instanceof u.GraphQLNonNull)return b.NON_NULL;throw new Error("Unknown kind of type: "+e)}},name:{type:c.GraphQLString},description:{type:c.GraphQLString},fields:{type:new u.GraphQLList(new u.GraphQLNonNull(v)),args:{includeDeprecated:{type:c.GraphQLBoolean,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if(e instanceof u.GraphQLObjectType||e instanceof u.GraphQLInterfaceType){var r=e.getFields(),i=Object.keys(r).map(function(e){ret
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@k00p Thanks for PR 👍
It looks great and I'm ready to merge.
But can you please remove this generated file from PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That file is intended to be a part of the PR. This way when this project is grabbed via npm/yarn the bundle is available.

Is there a reason for not including it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, we may be able to do this in the npm install script. Let me test...

Copy link
Author

@k00p k00p Feb 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so here's the difficulty with that approach - if there is no webpack set up in the project before adding graphql-lodash, the package install fails:

$ yarn add APIs-guru/graphql-lodash#18/head
yarn add v1.13.0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error /mnt/c/temmmmmp/node_modules/graphql-lodash: Command failed.
Exit code: 1
Command: npm run build:bundle
Arguments:
Directory: /mnt/c/Workspace/temmmmmp/node_modules/graphql-lodash
Output:

> graphql-lodash@1.3.3 build:bundle /mnt/c/Workspace/temmmmmp/node_modules/graphql-lodash
> webpack -p --config webpack.config.js

module.js:549
    throw err;
    ^

Error: Cannot find module 'webpack'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/mnt/c/Workspace/temmmmmp/node_modules/graphql-lodash/webpack.config.js:1:79)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! graphql-lodash@1.3.3 build:bundle: `webpack -p --config webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the graphql-lodash@1.3.3 build:bundle script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/--/.npm/_logs/2019-02-20T22_06_31_406Z-debug.log
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, we are either looking at:

  1. Seriously extending the install times and download overhead by pulling down webpack for the build of the bundle
  2. Including the pre-generated bundle in the distribution
  3. Squeezing shut our eyes at this use case and closing the PR

Suggestions?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3. Squeezing shut our eyes at this use case and closing the PR

Look into node_modules/graphql-lodash/lib and see that graphql-lodash.bundle.js already there 🎉
On NPM you publishing your local folder and not a repo content.
Just run npm publish --dry-run and you will see all files included in the package.
I actually found out we have broken .npmignore and releasing a bunch of unneeded files, after the fix it looks like this:
image

John Kupko added 2 commits February 20, 2019 14:03
…le post install"

This reverts commit 4f1046d.

This strategy did not work well in production.
@k00p
Copy link
Author

k00p commented Mar 15, 2019

https://observablehq.com/@mbostock/hello-dagre

An example of useful things that can be done when webpacks are included in repos.

In the lodash declaration the minimized JS is pulled from the lodash repo:

lodash = window.lodash = await require("lodash@4/lodash.min.js")

Any chance you would reconsider having the webpack available so that it could be used on "web REPL" apps like Observable or even in GraphiQL?

@IvanGoncharov
Copy link
Member

IvanGoncharov commented Mar 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants