babel-plugin-relay 4.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Relay v4.0.0
2
+ * Relay v5.0.0
3
3
  */
4
- module.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}([function(e,t){e.exports=require("graphql")},function(e,t){e.exports=require("util")},function(e,t,n){"use strict";var i=n(1);e.exports=function(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];throw new Error(i.format.apply(i,[t].concat(r)))}}},function(e,t,n){"use strict";e.exports=function(e,t){this.message=e,this.loc=t,this.stack=(new Error).stack}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=require("path")},function(e,t,n){"use strict";var i=n(17),r=n(7);e.exports=function(e,t,n,a,o,s,u,l,c){try{var f=c.file&&c.file.opts||{};return r(n,c.opts||{},f).transform(e,a,{documentName:o,propName:s,tagName:u,enableValidation:l})}catch(e){throw t.buildCodeFrameError(i(e),Error)}}},function(e,t,n){"use strict";var i=n(18),r=n(25),a=n(0),o=a.buildASTSchema,s=a.buildClientSchema,u=new Map;e.exports=function(e,t,n){var a=u.get(e);if(!a){var l=function(e,t){var n="function"==typeof e?e():e,i="string"==typeof n?r(n,t.sourceRoot):n;if(i.__schema)return s(i);if(i.data&&i.data.__schema)return s(i.data);if(i.kind&&"Document"===i.kind)return o(i,{assumeValid:!0});throw new Error("Invalid introspection data supplied to babel-plugin-relay. The resulting schema is not an object with a `__schema` property or a schema IDL language.")}(e,n);a=new i(l,{inputArgumentName:t.inputArgumentName,snakeCase:Boolean(t.snakeCase),substituteVariables:Boolean(t.substituteVariables),validator:t.validator}),u.set(e,a)}return a}},function(e,t,n){var i=n(20);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}},function(e,t,n){var i=n(21),r=n(22),a=n(23);e.exports=function(e){return i(e)||r(e)||a()}},function(e,t,n){"use strict";e.exports=function(e,t,n){for(var i=0;i<e.length;i++)if(t.call(n,e[i],i,e))return e[i]}},function(e,t,n){"use strict";var i=n(4),r=i(n(8)),a=i(n(24)),o=n(3),s=n(10),u=n(2),l=n(1),c=n(12).GraphQLRelayDirective,f=n(13).ID,m=n(0),p=m.GraphQLBoolean,d=m.GraphQLEnumType,g=m.GraphQLFloat,h=m.GraphQLID,v=m.GraphQLInputObjectType,y=m.GraphQLInt,b=m.GraphQLInterfaceType,T=m.GraphQLList,N=m.GraphQLNonNull,w=m.GraphQLObjectType,x=m.GraphQLScalarType,E=m.GraphQLString,L=m.GraphQLUnionType,D=m.isAbstractType,A=m.SchemaMetaFieldDef,k=m.TypeMetaFieldDef,F=m.TypeNameMetaFieldDef,S=function(){function e(e,t){this.ast=t,this.context=e}var t=e.prototype;return t.getLocation=function(){return this.ast.loc},t.getType=function(){u(!1,"Missing Implementation")},t.getField=function(e){return s(this.getFields(),function(t){return t.getName()===e})},t.getFields=function(){var e=[];return this.getSelections().forEach(function(t){t instanceof _&&e.push(t)}),e},t.getSelections=function(){var e=this;return this.ast.selectionSet?this.ast.selectionSet.selections.map(function(t){if("Field"===t.kind)return new _(e.context,t,e.getType());if("FragmentSpread"===t.kind)return new C(e.context,t);if("InlineFragment"===t.kind)return new j(e.context,t,e.getType());throw new o(l.format("Unexpected selection kind: %s",t.kind),e.getLocation())}):[]},t.getDirectives=function(){var e=this;return(this.ast.directives||[]).map(function(t){return new M(e.context,t)})},t.hasDirective=function(e){return(this.ast.directives||[]).some(function(t){return t.name.value===e})},t.isPattern=function(){return this.context.isPattern},e}(),R=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getName=function(){return this.ast.name?this.ast.name.value:this.getType().getName({modifiers:!1})},t}(S),V=function(e){function t(t,n,i){var a,o={},u=s(n.directives||[],function(e){return"relay"===e.name.value});u&&(u.arguments||[]).forEach(function(e){o[e.name.value]=e.value});var l=o.pattern&&"BooleanValue"===o.pattern.kind&&o.pattern.value;return(a=e.call(this,(0,r.default)({},t,{isPattern:l}),n)||this).parentType=i,a}return(0,a.default)(t,e),t.prototype.getType=function(){var e=this.ast.typeCondition;if(e){for(;"NamedType"!==e.kind;)e=e.type;return new U(this.context,this.context.schema.getType(e.name.value))}if("InlineFragment"===this.ast.kind){if(!this.parentType)throw new o("Cannot get type of typeless inline fragment without parent type.",this.getLocation());return this.parentType}throw new o(l.format("Unexpected fragment kind: %s",this.ast.kind),this.getLocation())},t}(R),I=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getType=function(){return new U(this.context,this.context.schema.getMutationType())},t}(R),Q=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getType=function(){return new U(this.context,this.context.schema.getQueryType())},t}(R),P=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getType=function(){return new U(this.context,this.context.schema.getSubscriptionType())},t}(R),_=function(e){function t(t,n,i){var r,a=(r=e.call(this,t,n)||this).ast.name.value,s=i.getFieldDefinition(a,n);if(!s)throw new o(l.format("You supplied a field named `%s` on type `%s`, but no such field exists on that type.",a,i.getName({modifiers:!1})),r.getLocation());return r.fieldDef=s,r}(0,a.default)(t,e);var n=t.prototype;return n.getName=function(){return this.ast.name.value},n.getAlias=function(){return this.ast.alias?this.ast.alias.value:null},n.getType=function(){return this.fieldDef.getType()},n.hasArgument=function(e){return this.getArguments().some(function(t){return t.getName()===e})},n.findArgument=function(e){return s(this.getArguments(),function(t){return t.getName()===e})},n.getArguments=function(){var e=this,t=this.fieldDef.getDeclaredArguments();return(this.ast.arguments||[]).map(function(n){var i=n.name.value,r=t[i];if(!r)throw new o(l.format("You supplied an argument named `%s` on field `%s`, but no such argument exists on that field.",i,e.getName()),e.getLocation());return new O(e.context,n,r)})},n.hasDeclaredArgument=function(e){return this.fieldDef.getDeclaredArguments().hasOwnProperty(e)},n.getDeclaredArgument=function(e){return this.fieldDef.getArgument(e)},n.getDeclaredArguments=function(){return this.fieldDef.getDeclaredArguments()},t}(S),C=function(e){function t(){return e.apply(this,arguments)||this}(0,a.default)(t,e);var n=t.prototype;return n.getName=function(){return this.ast.name.value},n.getSelections=function(){throw new o("Cannot get selection of a fragment spread.",this.getLocation())},t}(S),j=function(e){function t(t,n,i){var r;return(r=e.call(this,t,n)||this).parentType=i,r}return(0,a.default)(t,e),t.prototype.getFragment=function(){return new V(this.context,this.ast,this.parentType)},t}(S),M=function(){function e(e,t){var n=this;this.ast=t,this.context=e,this.argTypes={};var i=t.name.value,r=i===c.name?c:e.schema.getDirective(i);if(!r)throw new o(l.format("You supplied a directive named `%s`, but no such directive exists.",i),this.getLocation());r.args.forEach(function(e){n.argTypes[e.name]=new G(e.type)})}var t=e.prototype;return t.getLocation=function(){return this.ast.loc},t.getName=function(){return this.ast.name.value},t.getArguments=function(){var e=this;return(this.ast.arguments||[]).map(function(t){var n=t.name.value,i=e.argTypes[n];if(!i)throw new o(l.format("You supplied an argument named `%s` on directive `%s`, but no such argument exists on that directive.",n,e.getName()),e.getLocation());return new O(e.context,t,i)})},e}(),O=function(){function e(e,t,n){this.ast=t,this.context=e,this.type=n}var t=e.prototype;return t.getLocation=function(){return this.ast.loc},t.getName=function(){return this.ast.name.value},t.getType=function(){return this.type},t.isVariable=function(){return"Variable"===this.ast.value.kind},t.getVariableName=function(){if("Variable"!==this.ast.value.kind)throw new o("Cannot get variable name of an argument value.",this.getLocation());return this.ast.value.name.value},t.getValue=function(){var t=this;if(this.isVariable())throw new o("Cannot get value of an argument variable.",this.getLocation());var n=this.ast.value;return"ListValue"===n.kind?n.values.map(function(n){return new e(t.context,(0,r.default)({},t.ast,{value:n}),t.type.ofType())}):Y(n)},e}(),U=function(){function e(e,t){this.context=e;var n=q(t),i=n.isListType,r=n.isNonNullType,a=n.schemaUnmodifiedType;this.isListType=i,this.isNonNullType=r,this.schemaUnmodifiedType=a,this.schemaModifiedType=t}var t=e.prototype;return t.canHaveSubselections=function(){return!(this.schemaUnmodifiedType instanceof x||this.schemaUnmodifiedType instanceof d)},t.getName=function(e){return e.modifiers?this.schemaModifiedType.toString():this.schemaUnmodifiedType.toString()},t.hasField=function(e){return!!this.getFieldDefinition(e)},t.getFieldDefinition=function(e,t){var n,i=this.schemaUnmodifiedType,r=i===this.context.schema.getQueryType(),a=i instanceof w||i instanceof b||i instanceof L,o=i instanceof w||i instanceof b;if(r&&e===A.name?n=A:r&&e===k.name?n=k:a&&e===F.name?n=F:o&&(n=i.getFields()[e]),!n&&D(i)&&t&&t.directives&&t.directives.some(function(e){return"fixme_fat_interface"===e.name.value}))for(var u=this.context.schema.getPossibleTypes(i),l=function(i){var r=u[i].getFields()[e];if(r&&(n=r,t&&t.arguments&&t.arguments.every(function(e){return s(r.args,function(t){return t.name===e.name.value})})))return"break"},c=0;c<u.length;c++){if("break"===l(c))break}return n?new B(this.context,n):null},t.getInterfaces=function(){var t=this;return this.schemaUnmodifiedType instanceof w?this.schemaUnmodifiedType.getInterfaces().map(function(n){return new e(t.context,n)}):[]},t.getConcreteTypes=function(){var t=this;return this.isAbstract()||u(!1,"Cannot get concrete types of a concrete type."),this.context.schema.getPossibleTypes(this.schemaUnmodifiedType).map(function(n){return new e(t.context,n)})},t.getIdentifyingFieldDefinition=function(){return this.alwaysImplements("Node")?this.getFieldDefinition(f):null},t.isAbstract=function(){return D(this.schemaUnmodifiedType)},t.isList=function(){return this.isListType},t.isNonNull=function(){return this.isNonNullType},t.isQueryType=function(){return this.schemaUnmodifiedType===this.context.schema.getQueryType()},t.isConnection=function(){if(!/Connection$/.test(this.getName({modifiers:!1})))return!1;var e=this.getFieldDefinition("edges");if(!e||!e.getType().canHaveSubselections())return!1;var t=e.getType().getFieldDefinition("node");if(!t||!t.getType().canHaveSubselections())return!1;var n=e.getType().getFieldDefinition("cursor");return!(!n||n.getType().canHaveSubselections())},t.isConnectionEdge=function(){return/Edge$/.test(this.getName({modifiers:!1}))&&this.hasField("node")&&this.hasField("cursor")},t.isConnectionPageInfo=function(){return"PageInfo"===this.getName({modifiers:!1})},t.alwaysImplements=function(e){return this.getName({modifiers:!1})===e||this.getInterfaces().some(function(t){return t.getName({modifiers:!1})===e})||this.isAbstract()&&this.getConcreteTypes().every(function(t){return t.alwaysImplements(e)})},t.mayImplement=function(e){return this.getName({modifiers:!1})===e||this.getInterfaces().some(function(t){return t.getName({modifiers:!1})===e})||this.isAbstract()&&this.getConcreteTypes().some(function(t){return t.alwaysImplements(e)})},t.generateField=function(e){var t={kind:"Field",name:{kind:"Name",value:e}};return new _(this.context,t,this)},t.generateIdFragment=function(){return new V(this.context,{kind:"Fragment",name:{kind:"Name",value:"IdFragment"},typeCondition:{kind:"NamedType",name:{value:"Node"}}},this)},e}(),B=function(){function e(e,t){this.context=e,this.schemaFieldDef=t}var t=e.prototype;return t.getName=function(){return this.schemaFieldDef.name},t.getType=function(){return new U(this.context,this.schemaFieldDef.type)},t.hasArgument=function(e){return this.schemaFieldDef.args.some(function(t){return t.name===e})},t.getArgument=function(e){var t=s(this.schemaFieldDef.args,function(t){return t.name===e});return t||u(!1,"You tried to get an argument named `%s` on field `%s`, but no such argument exists on that field.",e,this.getName()),new G(t.type)},t.getDeclaredArguments=function(){var e={};return this.schemaFieldDef.args.forEach(function(t){e[t.name]=new G(t.type)}),e},e}(),G=function(){function e(e){var t=q(e),n=t.isListType,i=t.isNonNullType,r=t.schemaUnmodifiedType;this.isListType=n,this.isNonNullType=i,this.schemaUnmodifiedArgType=r,this.schemaModifiedArgType=e}var t=e.prototype;return t.getName=function(e){return e.modifiers?this.schemaModifiedArgType.toString():this.schemaUnmodifiedArgType.toString()},t.ofType=function(){return this.isList()||this.isNonNull()||u(!1,"Can only get type of list or non-null type."),new e(this.schemaUnmodifiedArgType)},t.isCustomScalar=function(){return this.isScalar()&&!(this.schemaUnmodifiedArgType===p||this.schemaUnmodifiedArgType===g||this.schemaUnmodifiedArgType===h||this.schemaUnmodifiedArgType===y||this.schemaUnmodifiedArgType===E)},t.isBoolean=function(){return this.schemaUnmodifiedArgType===p},t.isEnum=function(){return this.schemaUnmodifiedArgType instanceof d},t.isID=function(){return this.schemaUnmodifiedArgType===h},t.isList=function(){return this.isListType},t.isNonNull=function(){return this.isNonNullType},t.isNumber=function(){return this.schemaUnmodifiedArgType===g||this.schemaUnmodifiedArgType===y},t.isObject=function(){return this.schemaUnmodifiedArgType instanceof v},t.isScalar=function(){return this.schemaUnmodifiedArgType instanceof x},t.isString=function(){return this.schemaUnmodifiedArgType===E},e}();function q(e){for(var t=!1,n=!1,i=e;;){if(i instanceof T)t=!0;else{if(!(i instanceof N))break;n=!0}i=i.ofType}return{isListType:t,isNonNullType:n,schemaUnmodifiedType:i}}function Y(e){switch(e.kind){case"IntValue":return parseInt(e.value,10);case"FloatValue":return parseFloat(e.value);case"StringValue":case"BooleanValue":case"EnumValue":return e.value;case"ListValue":return e.values.map(Y);case"NullValue":return null;case"ObjectValue":var t={};return e.fields.forEach(function(e){t[e.name.value]=Y(e.value)}),t;case"Variable":throw new o(l.format("Unexpected nested variable `%s`; variables are supported as top-level arguments - `node(id: $id)` - or directly within lists - `nodes(ids: [$id])`.",e.name.value),e.loc);default:throw new o(l.format("Unexpected value kind: %s",e.kind),e.loc)}}e.exports={RelayQLArgument:O,RelayQLArgumentType:G,RelayQLDefinition:R,RelayQLDirective:M,RelayQLField:_,RelayQLFieldDefinition:B,RelayQLFragment:V,RelayQLFragmentSpread:C,RelayQLInlineFragment:j,RelayQLMutation:I,RelayQLNode:S,RelayQLQuery:Q,RelayQLSubscription:P,RelayQLType:U}},function(e,t,n){"use strict";var i="directive @relay(\n # Marks a connection field as containing nodes without 'id' fields.\n # This is used to silence the warning when diffing connections.\n isConnectionWithoutNodeID: Boolean,\n\n # Marks a fragment as intended for pattern matching (as opposed to fetching).\n # Used in Classic only.\n pattern: Boolean,\n\n # Marks a fragment as being backed by a GraphQLList.\n plural: Boolean,\n\n # Marks a fragment spread which should be unmasked if provided false\n mask: Boolean = true,\n\n # Selectively pass variables down into a fragment. Only used in Classic.\n variables: [String!],\n) on FRAGMENT_DEFINITION | FRAGMENT_SPREAD | INLINE_FRAGMENT | FIELD",r=(0,n(0).buildSchema)(i+"\ntype Query { x: String }").getDirective("relay");if(!r)throw new Error("Failed to create GraphQLRelayDirective.");e.exports={SCHEMA_EXTENSION:i,GraphQLRelayDirective:r}},function(e,t,n){"use strict";e.exports={ID:"id"}},function(e,t,n){"use strict";var i=n(15),r=n(6),a=n(31),o=n(32),s=n(33),u=n(2);e.exports=function(e){var t=e.types;if(!t)throw new Error('BabelPluginRelay: Expected plugin context to include "types", but got:'+String(e));var n={TaggedTemplateExpression:function(e,n){var l=o(e);if(l)i(t,e,n,l);else{var c=s(e),f=c[0],m=c[1],p=c[2];if(f&&m){var d=n.opts&&n.opts.schema;d||u(!1,'babel-plugin-relay: Missing schema option. Check your .babelrc file or wherever you configure your Babel plugins to ensure the "relay" plugin has a "schema" option.\nhttps://facebook.github.io/relay/docs/babel-plugin-relay.html#additional-options');var g=a(e,n);e.replaceWith(r(t,e,d,f,g,p,m,!0,n))}}}};return{visitor:{Program:function(e,t){e.traverse(n,t)}}}}},function(e,t,n){"use strict";var i=n(16),r=n(28),a=n(29);e.exports=function(e,t,n,o){if(1!==o.definitions.length)throw new Error("BabelPluginRelay: Expected exactly one definition per graphql tag.");var s=o.definitions[0];if("FragmentDefinition"!==s.kind&&"OperationDefinition"!==s.kind)throw new Error("BabelPluginRelay: Expected a fragment, mutation, query, or subscription, got `"+s.kind+"`.");return function(e,t,n){for(var i=t.scope;i.parent;)i=i.parent;if(t.scope===i)t.replaceWith(n);else{var r=i.generateDeclaredUidIdentifier("graphql");t.replaceWith(e.logicalExpression("||",r,e.assignmentExpression("=",r,n)))}}(e,t,function(e,t,n,o){var s=Boolean(t.opts&&t.opts.compat),u=Boolean(t.opts&&t.opts.haste),l=t.opts&&t.opts.isDevVariable,c=t.opts&&t.opts.artifactDirectory,f=t.opts&&t.opts.buildCommand||"relay-compiler",m="production"!==(process.env.BABEL_ENV||"development"),p=a(e,o,t,{artifactDirectory:c,buildCommand:f,isDevelopment:m,isHasteMode:u,isDevVariable:l});return s?r(e,p,i(e,n,o,t)):p}(e,n,t,s))}},function(e,t,n){"use strict";var i=n(0),r=n(6),a=n(7),o=n(27),s=n(2);function u(e,t){var n=0,r={},a={},o=null,u={Directive:function(e){switch(e.name.value){case"inline":throw new Error("@inline is only available in pure RelayModern mode.");case"argumentDefinitions":if(o)throw new Error("BabelPluginRelay: Expected only one @argumentDefinitions directive");return o=e.arguments,null;case"connection":return null;default:return e}},FragmentSpread:function(t){var i=t.directives,o=t.name.value,u=null,l=null,c=!0;if(0===i.length)l=o;else{var f=i[0];switch(1!==i.length&&s(!1,"BabelPluginRelay: Cannot use both `@arguments` and `@relay(mask: false)` on the same fragment spread when in compat mode."),f.name.value){case"arguments":case"uncheckedArguments_DEPRECATED":var d={};f.arguments.forEach(function(t){var n=t.value;"Variable"===n.kind&&(a[n.name.value]=null);var i=function(e,t){var n=t.name.value,i=t.value,r=null;switch(i.kind){case"Variable":var a=i.name.value;r=p(e,{kind:e.stringLiteral("CallVariable"),callVariableName:e.stringLiteral(a)});break;default:r=m(e,i)}return{name:n,ast:r}}(e,t);d[i.name]=i.ast}),u=p(e,d),l=o+"_args"+ ++n;break;case"relay":var g=f.arguments;(1!==g.length||"mask"!==g[0].name.value)&&s(!1,"BabelPluginRelay: Expected `@relay` directive to only have `mask` argument in compat mode, but get %s",g[0].name.value),l=o,c=!1!==g[0].value.value;break;default:throw new Error("BabelPluginRelay: Unsupported directive `"+f.name.value+"` on fragment spread `..."+o+"`.")}}return l||s(!1,"BabelPluginRelay: Expected `substitutionName` to be non-null"),r[l]={name:o,args:u,isMasked:c},Object.assign({},t,{name:{kind:"Name",value:l},directives:[]})},Variable:function(e){return a[e.name.value]=null,e}};return{classicAST:i.visit(t,u),fragments:r,variables:a,argumentDefinitions:o}}var l="RelayQL_GENERATED";function c(e,t,n,i){var r=[e.returnStatement(t)];return n.length>0&&r.unshift(e.variableDeclaration("const",n)),e.functionExpression(null,[e.identifier(l)],e.blockStatement(r))}function f(e,t,n){return p(e,{defaultValue:n,kind:e.stringLiteral("LocalArgument"),name:e.stringLiteral(t)})}function m(e,t){switch(t.kind){case"BooleanValue":return e.booleanLiteral(t.value);case"IntValue":return e.numericLiteral(parseInt(t.value,10));case"FloatValue":return e.numericLiteral(parseFloat(t.value));case"StringValue":case"EnumValue":return e.stringLiteral(t.value);case"ListValue":return e.arrayExpression(t.values.map(function(t){return m(e,t)}));default:throw new Error("BabelPluginRelay: Unsupported literal type `"+t.kind+"`.")}}function p(e,t){return e.objectExpression(Object.keys(t).map(function(n){return e.objectProperty(e.identifier(n),t[n])}))}function d(e){var t=e.opts&&e.opts.schema;return t||s(!1,'babel-plugin-relay: Missing schema option. Check your .babelrc file or wherever you configure your Babel plugins to ensure the "relay" plugin has a "schema" option.\nhttps://facebook.github.io/relay/docs/babel-plugin-relay.html#additional-options'),t}function g(e,t,n,a){var s=d(a),u=o(n.name.value),c=u[0],f=u[1],m=i.print(n),p=e.templateLiteral([e.templateElement({raw:m,cooked:m},!0)],[]);return r(e,t,s,p,c,f,l,!1,a)}function h(e,t,n){return Object.keys(n).map(function(i){var r=n[i],a=o(r.name),u=a[0],c=a[1];if(r.isMasked)return e.variableDeclarator(e.identifier(i),function(e,t,n,i,r){var a=[];i&&a.push(e.stringLiteral(i));r&&a.push(r);var o=function(e,t){var n=e.scope.getBinding(t);if(!n)return!1;if("module"===n.kind)return!1;if(n.path.isVariableDeclarator()&&n.path.get("init").node&&n.path.get("init.callee").isIdentifier({name:"require"}))return!1;return!0}(t,n)?e.logicalExpression("||",e.memberExpression(e.identifier(n),e.identifier("__container__")),e.identifier(n)):e.identifier(n);return e.callExpression(e.memberExpression(o,e.identifier("getFragment")),a)}(e,t,u,c,r.args));t.scope.hasBinding(u)||t.scope.hasBinding(c)||s(!1,"BabelPluginRelay: Please make sure module '".concat(u,"' is imported and not renamed or the\n fragment '").concat(r.name,"' is defined and bound to local variable '").concat(c,"'. "));var f=t.scope.hasBinding(c)?e.memberExpression(e.identifier(c),e.identifier(c)):e.logicalExpression("||",e.memberExpression(e.memberExpression(e.identifier(u),e.identifier(c)),e.identifier(c)),e.memberExpression(e.identifier(u),e.identifier(c)));return e.variableDeclarator(e.identifier(i),e.memberExpression(e.callExpression(e.memberExpression(e.identifier(l),e.identifier("__getClassicFragment")),[f,e.booleanLiteral(!0)]),e.identifier("node")))})}e.exports=function(e,t,n,i){if("FragmentDefinition"===n.kind)return function(e,t,n,i){var r=u(e,n),a=r.classicAST,o=r.fragments,s=r.variables,l=r.argumentDefinitions,d=h(e,t,o),v=p(e,{kind:e.stringLiteral("FragmentDefinition"),argumentDefinitions:function(e,t,n){var i=[];return Object.keys(n).forEach(function(n){var r=(t||[]).find(function(e){return e.name.value===n});if(r){var a=r.value.fields.find(function(e){return"defaultValue"===e.name.value}),o=a?m(e,a.value):e.nullLiteral();i.push(f(e,n,o))}else i.push(function(e,t){return e.objectExpression([e.objectProperty(e.identifier("kind"),e.stringLiteral("RootArgument")),e.objectProperty(e.identifier("name"),e.stringLiteral(t))])}(e,n))}),e.arrayExpression(i)}(e,l,s),node:g(e,t,a,i)});return c(e,v,d)}(e,t,n,i);if("OperationDefinition"===n.kind)return function(e,t,n,i){var r=n.name;if(!r)throw new Error("GraphQL operations must contain names");var o=u(e,n),s=o.classicAST,l=o.fragments,v=h(e,t,l),y="query"===s.operation?function(e,t,n,i){var r,o=d(i),s=i.file&&i.file.opts||{},u=a(o,i.opts||{},s);switch(n.operation){case"query":var l=u.schema.getQueryType();if(!l)throw new Error("Schema does not contain a root query type.");r=l.name;break;case"mutation":var c=u.schema.getMutationType();if(!c)throw new Error("Schema does not contain a root mutation type.");r=c.name;break;case"subscription":var f=u.schema.getSubscriptionType();if(!f)throw new Error("Schema does not contain a root subscription type.");r=f.name;break;default:throw new Error("BabelPluginRelay: Unexpected operation type: `"+n.operation+"`.")}var m={kind:"FragmentDefinition",loc:n.loc,name:{kind:"Name",value:n.name.value},typeCondition:{kind:"NamedType",name:{kind:"Name",value:r}},directives:n.directives,selectionSet:n.selectionSet};return g(e,t,m,i)}(e,t,s,i):g(e,t,s,i),b=p(e,{kind:e.stringLiteral("OperationDefinition"),argumentDefinitions:function(e,t){return t?e.arrayExpression(t.map(function(t){var n=t.variable.name.value,i=t.defaultValue?m(e,t.defaultValue):e.nullLiteral();return f(e,n,i)})):e.arrayExpression([])}(e,n.variableDefinitions),name:e.stringLiteral(r.value),operation:e.stringLiteral(s.operation),node:y});return c(e,b,v)}(e,t,n,i);throw new Error("BabelPluginRelay: Expected a fragment, mutation, query, or subscription, got `"+n.kind+"`.")}},function(e,t,n){"use strict";var i=n(3),r=n(1);e.exports=function(e){if(e instanceof i)return"Relay Transform Error: ".concat(e.message);var t=e.sourceText,n=e.validationErrors;if(n&&t){var a=t.split("\n");return n.map(function(e){return"GraphQL Validation Error: "+e.message+"\n"+e.locations.map(function(e){var t=a[e.line-1];return t&&[">","> "+t,"> "+" ".repeat(e.column-1)+"^^^"].join("\n")}).filter(Boolean).join("\n")}).join("\n")}return r.format("Relay Transform Error: %s\n\n%s",e.message,e.stack)}},function(e,t,n){"use strict";var i=n(19),r=n(2),a=n(1),o=n(11),s=o.RelayQLFragment,u=o.RelayQLMutation,l=o.RelayQLQuery,c=o.RelayQLSubscription,f=n(0),m=f.formatError,p=f.parse,d=f.Source,g=f.validate,h=f.FieldsOnCorrectTypeRule,v=f.FragmentsOnCompositeTypesRule,y=f.KnownArgumentNamesRule,b=f.KnownTypeNamesRule,T=f.PossibleFragmentSpreadsRule,N=f.ValuesOfCorrectTypeRule,w=f.VariablesInAllowedPositionRule,x=function(){function e(e,t){this.schema=e,this.options=t}var t=e.prototype;return t.transform=function(e,t,n){var r=this.processTemplateLiteral(t,n.documentName),a=r.substitutions,o=r.templateText,s=r.variableNames,u=this.processTemplateText(o,n),l=this.processDocumentText(u,n);return new(i(e,this.options))(n.tagName,s).print(l,a,n.enableValidation)},t.processTemplateLiteral=function(e,t){var n=this,i=[],a={},o=[];return e.quasis.forEach(function(s,u){var l=s.value.cooked;if(i.push(l),!s.tail){var c="RQL_"+u,f=e.expressions[u];o.push({name:c,value:f}),/:\s*$/.test(l)?(n.options.substituteVariables||r(!1,"You supplied a GraphQL document named `%s` that uses template substitution for an argument value, but variable substitution has not been enabled.",t),i.push("$"+c),a[c]=void 0):i.push("..."+c)}}),{substitutions:o,templateText:i.join("").trim(),variableNames:a}},t.processTemplateText=function(e,t){var n=t.documentName,i=t.propName,a=/^(fragment|mutation|query|subscription)\s*(\w*)?([\s\S]*)/.exec(e);a||r(!1,"You supplied a GraphQL document named `%s` with invalid syntax. It must start with `fragment`, `mutation`, `query`, or `subscription`.",n);var o=a[1],s=a[2]||n,u=a[3];return"fragment"===o&&"on"===s&&(s=n+(i?"_"+E(i):"")+"RelayQL",u="on"+u),o+" "+E(s)+" "+u},t.processDocumentText=function(e,t){var n=t.documentName,i=t.enableValidation,o=p(new d(e,n)),f=i?this.validateDocument(o,n):null;if(f){var m=new Error(a.format("You supplied a GraphQL document named `%s` with validation errors.",n));throw m.validationErrors=f,m.sourceText=e,m}var g=o.definitions[0],h={definitionName:E(n),isPattern:!1,generateID:function(){var e=0;return function(){return(e++).toString(32)}}(),schema:this.schema};if("FragmentDefinition"===g.kind)return new s(h,g);if("OperationDefinition"===g.kind){if("mutation"===g.operation)return new u(h,g);if("query"===g.operation)return new l(h,g);if("subscription"===g.operation)return new c(h,g);r(!1,"Unsupported operation: %s",g.operation)}else r(!1,"Unsupported definition kind: %s",g.kind)},t.validateDocument=function(e,t){1!==e.definitions.length&&r(!1,"You supplied a GraphQL document named `%s` with %d definitions, but it must have exactly one definition.",t,e.definitions.length);var n,i=this.options.validator;if(i)n=i().validate(this.schema,e);else{var a=[h,v,y,b,T,N,w];n=g(this.schema,e,a)}return n&&n.length>0?n.map(m):null},e}();function E(e){return e[0].toUpperCase()+e.slice(1)}e.exports=x},function(e,t,n){"use strict";var i=n(4),r=i(n(8)),a=i(n(9)),o=n(3),s=n(10),u=n(1),l=n(11),c=l.RelayQLField,f=l.RelayQLFragment,m=l.RelayQLFragmentSpread,p=l.RelayQLInlineFragment,d=l.RelayQLMutation,g=l.RelayQLQuery,h=l.RelayQLSubscription,v=n(13).ID;e.exports=function(e,t){var n=t.snakeCase?function(e){var t={};return Object.keys(e).forEach(function(e){t[e]=e.replace(/[A-Z]/g,function(e){return"_"+e.toLowerCase()})}),t}:function(e){return e},i=e.arrayExpression([]),l=n({__typename:"__typename",clientMutationId:"clientMutationId",clientSubscriptionId:"clientSubscriptionId",cursor:"cursor",edges:"edges",hasNextPage:"hasNextPage",hasPreviousPage:"hasPreviousPage",node:"node",pageInfo:"pageInfo"}),y=t.inputArgumentName||"input",b=e.nullLiteral(),T=function(){function t(e,t){this.tagName=e,this.variableNames=t}var n=t.prototype;return n.print=function(t,n){var i,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t instanceof g)i=this.printQuery(t,r);else if(t instanceof f)i=this.printFragment(t);else if(t instanceof d)i=this.printMutation(t,r);else{if(!(t instanceof h))throw new o(u.format("Unsupported definition: %s",t),t.getLocation());i=this.printSubscription(t,r)}return e.callExpression(e.functionExpression(null,n.map(function(t){return e.identifier(t.name)}),e.blockStatement([e.returnStatement(i)])),n.map(function(e){return e.value}))},n.printQuery=function(t,n){var i=t.getFields();if(1!==i.length&&n)throw new o(u.format("There are %d fields supplied to the query named `%s`, but queries must have exactly one field.",i.length,t.getName()),t.getLocation());var r=i[0],a=r.getType(),s=r.getArguments(),c={},f=a.getIdentifyingFieldDefinition();f&&(c[f.getName()]=!0),a.isAbstract()&&(c[l.__typename]=!0);var m=this.printSelections(r,c),p={};if(a.isList()&&(p.isPlural=!0),a.isAbstract()&&(p.isAbstract=!0),s.length>1)throw new o(u.format("Invalid root field `%s`; Relay only supports root fields with zero or one argument.",r.getName()),t.getLocation());var d=b;if(1===s.length){var g=s[0],h=g.getName(),v=g.getType().getName({modifiers:!0});p.identifyingArgName=h,p.identifyingArgType=v,d=e.arrayExpression([E({kind:e.valueToNode("Call"),metadata:D({type:v}),name:e.valueToNode(h),value:this.printArgumentValue(g)})])}return E({calls:d,children:m,directives:this.printDirectives(r.getDirectives()),fieldName:e.valueToNode(r.getName()),kind:e.valueToNode("Query"),metadata:D(p),name:e.valueToNode(t.getName()),type:e.valueToNode(a.getName({modifiers:!1}))})},n.printFragment=function(t){var n,i=this,r=t.getType(),a={};r.hasField(v)?a[v]=!0:N(t)&&(n=r.generateIdFragment()),r.isAbstract()&&(a[l.__typename]=!0);var u=this.printSelections(t,a,n?[n]:null,t.hasDirective("generated")),c=F(t),f=c&&s(c.getArguments(),function(e){return"variables"===e.getName()}),m=this.printRelayDirectiveMetadata(t,{isAbstract:r.isAbstract(),isTrackingEnabled:!!f}),p=E({children:u,directives:this.printDirectives(t.getDirectives()),id:this.printFragmentID(t),kind:e.valueToNode("Fragment"),metadata:m,name:e.valueToNode(t.getName()),type:e.valueToNode(r.getName({modifiers:!1}))});if(f){var d=f.getValue();if(!Array.isArray(d))throw new o("The variables argument to the @relay directive should be an array of strings.",t.getLocation());return e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__createFragment")),[p,e.objectExpression(d.map(function(e){var t=e.getValue();return A(t,i.printVariable(t))}))])}return p},n.printFragmentID=function(t){return e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__id")),[])},n.printMutation=function(t,n){var i=t.getFields();if(1!==i.length&&n)throw new o(u.format("There are %d fields supplied to the mutation named `%s`, but mutations must have exactly one field.",i.length,t.getName()),t.getLocation());var r=i[0],a=r.getType();w(r);var s={};a.hasField(l.clientMutationId)&&(s[l.clientMutationId]=!0);var c=this.printSelections(r,s),f={inputType:this.printArgumentTypeForMetadata(r.getDeclaredArgument(y))};return E({calls:e.arrayExpression([E({kind:e.valueToNode("Call"),metadata:D({}),name:e.valueToNode(r.getName()),value:this.printVariable("input")})]),children:c,directives:this.printDirectives(t.getDirectives()),kind:e.valueToNode("Mutation"),metadata:D(f),name:e.valueToNode(t.getName()),responseType:e.valueToNode(a.getName({modifiers:!1}))})},n.printSubscription=function(t,n){var i=t.getFields();if(1!==i.length&&n)throw new o(u.format("There are %d fields supplied to the subscription named `%s`, but subscriptions must have exactly one field.",i.length,t.getName()),t.getLocation());var r=i[0],a=r.getType();w(r);var s={};a.hasField(l.clientSubscriptionId)&&(s[l.clientSubscriptionId]=!0),a.hasField(l.clientMutationId)&&(s[l.clientMutationId]=!0);var c=this.printSelections(r,s),f={inputType:this.printArgumentTypeForMetadata(r.getDeclaredArgument(y))};return E({calls:e.arrayExpression([E({kind:e.valueToNode("Call"),metadata:D({}),name:e.valueToNode(r.getName()),value:this.printVariable("input")})]),children:c,directives:this.printDirectives(t.getDirectives()),kind:e.valueToNode("Subscription"),metadata:D(f),name:e.valueToNode(t.getName()),responseType:e.valueToNode(a.getName({modifiers:!1}))})},n.printSelections=function(t,n,r){var s=this,l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],f=[],d=[],g=!1;t.getSelections().forEach(function(e){if(e instanceof m){if(0!==e.getDirectives().length)throw new o("Directives are not yet supported for `${fragment}`-style fragment references.",e.getLocation());d.push(s.printFragmentReference(e)),g=!0}else if(e instanceof p)d.push(s.printFragment(e.getFragment()));else{if(!(e instanceof c))throw new o(u.format("Unsupported selection type `%s`.",e),e.getLocation());f.push(e)}}),r&&r.forEach(function(e){d.push(s.printFragment(e))});var h=this.printFields(f,t,n,l),v=(0,a.default)(h).concat(d);if(v.length){var y=e.arrayExpression(v);return g?function(t){return e.callExpression(e.memberExpression(e.memberExpression(i,e.identifier("concat")),e.identifier("apply")),[i,t])}(y):y}return b},n.printFields=function(e,t,n){var i=this,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=t.getType();o.isConnection()&&o.hasField(l.pageInfo)&&e.some(function(e){return e.getName()===l.edges})&&(n[l.pageInfo]=!0);var s=(0,r.default)({},n),u=[];return e.forEach(function(e){delete s[e.getName()],u.push(i.printField(e,t,n,s,a))}),Object.keys(s).forEach(function(e){var r=o.generateField(e);u.push(i.printField(r,t,n,s,a))}),u},n.printField=function(t,n,i,r){var a,s=this,c=arguments.length>4&&void 0!==arguments[4]&&arguments[4],f=t.getType(),m={},p={};f.hasField(v)?p[v]=!0:N(t)&&(a=f.generateIdFragment()),c||function(e,t){if("node"===e.getName()){var n=e.getDeclaredArguments(),i=Object.keys(n);if(!t.isQueryType()&&1===i.length&&i[0]===v)throw new o(u.format("You defined a `node(%s: %s)` field on type `%s`, but Relay requires the `node` field to be defined on the root type. See the Object Identification Guide: \nhttps://facebook.github.io/relay/docs/en/graphql-server-specification.html#object-identification",v,i[0]&&n[i[0]].getName({modifiers:!0}),t.getName({modifiers:!1})),e.getLocation())}}(t,n.getType()),f.canHaveSubselections()&&(m.canHaveSubselections=!0),f.alwaysImplements("Node")&&(m.inferredRootCallName="node",m.inferredPrimaryKey=v),f.isConnection()?(t.hasDeclaredArgument("first")||t.hasDeclaredArgument("last"))&&(c||function(e){var t=[e.findArgument("first"),e.findArgument("last"),e.findArgument("before"),e.findArgument("after")],n=t[0],i=t[1],r=t[2],a=t[3],s=!n||!i||n.isVariable()&&i.isVariable();if(!s)throw new o(u.format("Connection arguments `%s(first: <count>, last: <count>)` are not supported unless both are variables. Use `(first: <count>)`, `(last: <count>)`, or `(first: $<var>, last: $<var>)`.",e.getName()),e.getLocation());if(!(s=!n||!r||n.isVariable()&&r.isVariable()))throw new o(u.format("Connection arguments `%s(before: <cursor>, first: <count>)` are not supported unless both are variables. Use `(first: <count>)`, `(after: <cursor>, first: <count>)`, `(before: <cursor>, last: <count>)`, or `(before: $<var>, first: $<var>)`.",e.getName()),e.getLocation());if(!(s=!i||!a||i.isVariable()&&a.isVariable()))throw new o(u.format("Connection arguments `%s(after: <cursor>, last: <count>)` are not supported unless both are variables. Use `(last: <count>)`, `(before: <cursor>, last: <count>)`, `(after: <cursor>, first: <count>)`, or `(after: $<var>, last: $<var>)`.",e.getName()),e.getLocation());var c=e.getType().getFieldDefinition(l.edges).getType().getFieldDefinition(l.node).getType();x(e,function(t){if(t.getName()===l.edges||t.getName()===l.pageInfo){var n=e.isPattern()||e.hasArgument("find")||e.hasArgument("first")||e.hasArgument("last");if(!n)throw new o(u.format("You supplied the `%s` field on a connection named `%s`, but you did not supply an argument necessary for Relay to handle the connection. Please specify a limit argument like `first`, or `last` or fetch a specific item with a `find` argument.",t.getName(),e.getName()),e.getLocation())}else{var i=t.getType(),r=i.isList()&&i.getName({modifiers:!1})===c.getName({modifiers:!1});if(r)throw new o(u.format("You supplied a field named `%s` on a connection named `%s`, but pagination is not supported on connections without using `%s`. Use `%s{%s{%s{...}}}` instead.",t.getName(),e.getName(),l.edges,e.getName(),l.edges,l.node),e.getLocation())}})}(t),m.isConnection=!0,t.hasDeclaredArgument("find")&&(m.isFindable=!0)):f.isConnectionPageInfo()?(p[l.hasNextPage]=!0,p[l.hasPreviousPage]=!0):f.isConnectionEdge()&&(p[l.cursor]=!0,p[l.node]=!0),f.isAbstract()&&(m.isAbstract=!0,p[l.__typename]=!0),f.isList()&&(m.isPlural=!0),r.hasOwnProperty(t.getName())&&(m.isGenerated=!0),i.hasOwnProperty(t.getName())&&(m.isRequisite=!0);var d=this.printSelections(t,p,a?[a]:null,c),g=t.getAlias(),h=t.getArguments(),y=h.length?e.arrayExpression(h.map(function(e){return s.printArgument(e)})):b;return E({alias:g?e.valueToNode(g):b,calls:y,children:d,directives:this.printDirectives(t.getDirectives()),fieldName:e.valueToNode(t.getName()),kind:e.valueToNode("Field"),metadata:this.printRelayDirectiveMetadata(t,m),type:e.valueToNode(f.getName({modifiers:!1}))})},n.printFragmentReference=function(t){return e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__frag")),[e.identifier(t.getName())])},n.printArgument=function(t){var n={},i=this.printArgumentTypeForMetadata(t.getType());return i&&(n.type=i),E({kind:e.valueToNode("Call"),metadata:D(n),name:e.valueToNode(t.getName()),value:this.printArgumentValue(t)})},n.printArgumentValue=function(e){return e.isVariable()?this.printVariable(e.getVariableName()):this.printValue(e.getValue())},n.printVariable=function(t){return this.variableNames.hasOwnProperty(t)?e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__var")),[e.identifier(t)]):E({kind:e.valueToNode("CallVariable"),callVariableName:e.valueToNode(t)})},n.printValue=function(t){var n=this;return Array.isArray(t)?e.arrayExpression(t.map(function(e){return n.printArgumentValue(e)})):E({kind:e.valueToNode("CallValue"),callValue:null==t?e.nullLiteral():k(t)})},n.printDirectives=function(t){var n=this,i=[];return t.forEach(function(t){"relay"!==t.getName()&&i.push(e.objectExpression([A("kind",e.valueToNode("Directive")),A("name",e.valueToNode(t.getName())),A("args",e.arrayExpression(t.getArguments().map(function(t){return e.objectExpression([A("name",e.valueToNode(t.getName())),A("value",n.printArgumentValue(t))])})))]))}),i.length?e.arrayExpression(i):b},n.printRelayDirectiveMetadata=function(t,n){var i=[],r=F(t);if(r&&r.getArguments().forEach(function(n){if(n.isVariable())throw new o(u.format("You supplied `$%s` as the `%s` argument to the `@relay` directive, but `@relay` require scalar argument values.",n.getVariableName(),n.getName()),t.getLocation());"variables"!==n.getName()&&i.push(A(n.getName(),e.valueToNode(n.getValue())))}),n){var a=n;Object.keys(a).forEach(function(t){a[t]&&i.push(A(t,e.valueToNode(a[t])))})}return e.objectExpression(i)},n.printArgumentTypeForMetadata=function(e){return e.isBoolean()||e.isID()||e.isString()?null:e.getName({modifiers:!0})},t}();function N(e){return e.getType().mayImplement("Node")&&!e.getSelections().some(function(e){return e instanceof p&&"Node"===e.getFragment().getType().getName({modifiers:!1})})}function w(e){var t=e.getDeclaredArguments(),n=Object.keys(t);if(1!==n.length)throw new o(u.format("Your schema defines a mutation field `%s` that takes %d arguments, but mutation fields must have exactly one argument named `%s`.",e.getName(),n.length,y),e.getLocation());if(n[0]!==y)throw new o(u.format("Your schema defines a mutation field `%s` that takes an argument named `%s`, but mutation fields must have exactly one argument named `%s`.",e.getName(),n[0],y),e.getLocation());var i=e.getArguments();if(i.length>1)throw new o(u.format("There are %d arguments supplied to the mutation field named `%s`, but mutation fields must have exactly one `%s` argument.",i.length,e.getName(),y),e.getLocation())}var x=function e(t,n){t.getSelections().forEach(function(t){t instanceof c?n(t):t instanceof p&&e(t.getFragment(),n)})};function E(t){var n=[];return Object.keys(t).forEach(function(e){var i=t[e];i!==b&&n.push(A(e,i))}),e.objectExpression(n)}function L(t){return t.split(".").reduce(function(t,n){return t?e.memberExpression(t,e.identifier(n)):e.identifier(n)},null)}function D(t){var n=[];return Object.keys(t).forEach(function(i){var r=t[i];r&&n.push(A(i,e.valueToNode(r)))}),e.objectExpression(n)}function A(t,n){return e.objectProperty(e.identifier(t),n)}function k(t){if(null==t)return b;if(Array.isArray(t))return e.arrayExpression(t.map(k));if("object"==typeof t&&null!=t){var n=t;return e.objectExpression(Object.keys(n).map(function(e){return A(e,k(n[e]))}))}return e.valueToNode(t)}function F(e){return s(e.getDirectives(),function(e){return"relay"===e.getName()})}return T}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";var i=n(26),r=n(5),a=n(12).SCHEMA_EXTENSION,o=n(0).parse;function s(e,t){var n=!i.existsSync(e)&&t?r.join(t,e):e;return i.readFileSync(n,"utf8")}e.exports=function(e,t){try{var n=e.split(",");if(n.length>1)return o(a+"\n"+n.map(function(e){return s(e,t)}).join("\n"));var i=s(e,t);return"{"===i[0]?JSON.parse(i):o(a+"\n"+i)}catch(t){throw console.error("Encountered the following error while loading the GraphQL schema: "+e+"\n\n"+t.stack.split("\n").map(function(e){return"> "+e}).join("\n")),t}}},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";var i="data";e.exports=function(e){var t=e.match(/^([a-zA-Z][a-zA-Z0-9]*)(?:_([a-zA-Z][_a-zA-Z0-9]*))?$/);if(!t)throw new Error("BabelPluginGraphQL: Fragments should be named `ModuleName_fragmentName`, got `"+e+"`.");var n=t[1],r=t[2];if(r===i)throw new Error("BabelPluginGraphQL: Fragment `"+e+"` should not end in `_data` to avoid conflict with a fragment named `"+n+"` which also provides resulting data via the React prop `data`. Either rename this fragment to `"+n+"` or choose a different prop name.");return[n,r||i]}},function(e,t,n){"use strict";e.exports=function(e,t,n){return e.objectExpression([e.objectProperty(e.identifier("modern"),t),e.objectProperty(e.identifier("classic"),n)])}},function(e,t,n){"use strict";var i=n(4)(n(9)),r=n(30),a=n(2),o=n(5),s=n(0).print,u="./__generated__/";e.exports=function(e,t,n,l){var c=t.name&&t.name.value;if(!c)throw new Error("GraphQL operations and fragments must contain names");var f=c+".graphql",m=l.isHasteMode?f:l.artifactDirectory?function(e,t,n){null==e.file&&a(!1,"babel state file is null");var i=e.file.opts.filename,r=o.relative(o.dirname(i),o.resolve(t));return(0!==r.length&&r.startsWith(".")?"":"./")+o.join(r,n)}(n,l.artifactDirectory,f):u+f,p=r.createHash("md5").update(s(t),"utf8").digest("hex"),d=e.callExpression(e.identifier("require"),[e.stringLiteral(m)]),g=[e.returnStatement(d)];if(null!=l.isDevVariable||l.isDevelopment){var h=e.identifier("node"),v=e.memberExpression(h,e.identifier("hash")),y=[e.variableDeclaration("const",[e.variableDeclarator(h,d)]),e.ifStatement(e.logicalExpression("&&",v,e.binaryExpression("!==",v,e.stringLiteral(p))),e.blockStatement([e.expressionStatement(function(e,t,n){return e.callExpression(e.memberExpression(e.identifier("console"),e.identifier("error")),[e.stringLiteral("The definition of '".concat(t,"' appears to have changed. Run ")+"`"+n+"` to update the generated files to receive the expected data.")])}(e,c,l.buildCommand))]))];null!=l.isDevVariable&&(y=[e.ifStatement(e.identifier(l.isDevVariable),e.blockStatement(y))]),g.unshift.apply(g,(0,i.default)(y))}return e.functionExpression(null,[],e.blockStatement(g))}},function(e,t){e.exports=require("crypto")},function(e,t,n){"use strict";var i=n(5).basename,r="providesModule";e.exports=function(e,t){for(var n=e;n.parentPath;)n=n.parentPath;var a=n.documentName;if(!a){var o=n.parent;if(o.comments&&o.comments.length)for(var s,u=o.comments[0].value||"",l=/@(\S+) *(\S*)/g;s=l.exec(u);){var c=s[1],f=s[2];if(c===r){a=f.replace(/[\.-:]/g,"_");break}}var m=t.file&&t.file.opts&&t.file.opts.filename&&i(t.file.opts.filename);if(m&&!a){var p=m.match(/^[_A-Za-z][_0-9A-Za-z]*/);p&&(a=p[0])}a=a||"UnknownFile",n.documentName=a}return a}},function(e,t,n){"use strict";var i=n(0);e.exports=function(e){if(!e.get("tag").isIdentifier({name:"graphql"}))return null;var t=e.node.quasi.quasis;if(1!==t.length)throw new Error("BabelPluginRelay: Substitutions are not allowed in graphql fragments. Included fragments should be referenced as `...MyModule_propName`.");var n=t[0].value.raw,r=i.parse(n);if(0===r.definitions.length)throw new Error("BabelPluginRelay: Unexpected empty graphql tag.");return r}},function(e,t,n){"use strict";e.exports=function(e){var t=e.node,n=e.get("tag"),i=n.matchesPattern("Relay.QL")?"Relay.QL":n.matchesPattern("RelayClassic_DEPRECATED.QL")?"RelayClassic_DEPRECATED.QL":n.matchesPattern("RelayClassic.QL")?"RelayClassic.QL":n.isIdentifier({name:"RelayQL"})?"RelayQL":null;if(!i)return[null,null,null];for(var r=e,a=null;!a&&(r=r.parentPath);)r.isProperty()&&(a=r.node.key.name);return[t.quasi,i,a]}}]);
4
+ module.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}([function(e,t){e.exports=require("graphql")},function(e,t){e.exports=require("util")},function(e,t,n){"use strict";var i=n(1);e.exports=function(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];throw new Error(i.format.apply(i,[t].concat(r)))}}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var i=n(15);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}},function(e,t,n){"use strict";e.exports=function(e,t){this.message=e,this.loc=t,this.stack=(new Error).stack}},function(e,t){e.exports=require("path")},function(e,t,n){"use strict";var i=n(18),r=n(8);e.exports=function(e,t,n,a,o,s,u,l,c){try{var f=c.file&&c.file.opts||{};return r(n,c.opts||{},f).transform(e,a,{documentName:o,propName:s,tagName:u,enableValidation:l})}catch(e){throw t.buildCodeFrameError(i(e),Error)}}},function(e,t,n){"use strict";var i=n(19),r=n(25),a=n(0),o=a.buildASTSchema,s=a.buildClientSchema,u=new Map;e.exports=function(e,t,n){var a=u.get(e);if(!a){var l=function(e,t){var n="function"==typeof e?e():e,i="string"==typeof n?r(n,t.sourceRoot):n;if(i.__schema)return s(i);if(i.data&&i.data.__schema)return s(i.data);if(i.kind&&"Document"===i.kind)return o(i,{assumeValid:!0});throw new Error("Invalid introspection data supplied to babel-plugin-relay. The resulting schema is not an object with a `__schema` property or a schema IDL language.")}(e,n);a=new i(l,{inputArgumentName:t.inputArgumentName,snakeCase:Boolean(t.snakeCase),substituteVariables:Boolean(t.substituteVariables),validator:t.validator}),u.set(e,a)}return a}},function(e,t,n){var i=n(21),r=n(22),a=n(23);e.exports=function(e){return i(e)||r(e)||a()}},function(e,t,n){"use strict";e.exports=function(e,t,n){for(var i=0;i<e.length;i++)if(t.call(n,e[i],i,e))return e[i]}},function(e,t,n){"use strict";var i=n(3),r=i(n(4)),a=i(n(24)),o=n(5),s=n(10),u=n(2),l=n(1),c=n(12).GraphQLRelayDirective,f=n(13).ID,p=n(0),m=p.GraphQLBoolean,d=p.GraphQLEnumType,g=p.GraphQLFloat,h=p.GraphQLID,v=p.GraphQLInputObjectType,y=p.GraphQLInt,b=p.GraphQLInterfaceType,T=p.GraphQLList,N=p.GraphQLNonNull,w=p.GraphQLObjectType,x=p.GraphQLScalarType,E=p.GraphQLString,L=p.GraphQLUnionType,D=p.isAbstractType,k=p.SchemaMetaFieldDef,A=p.TypeMetaFieldDef,_=p.TypeNameMetaFieldDef,F=function(){function e(e,t){this.ast=t,this.context=e}var t=e.prototype;return t.getLocation=function(){return this.ast.loc},t.getType=function(){u(!1,"Missing Implementation")},t.getField=function(e){return s(this.getFields(),function(t){return t.getName()===e})},t.getFields=function(){var e=[];return this.getSelections().forEach(function(t){t instanceof P&&e.push(t)}),e},t.getSelections=function(){var e=this;return this.ast.selectionSet?this.ast.selectionSet.selections.map(function(t){if("Field"===t.kind)return new P(e.context,t,e.getType());if("FragmentSpread"===t.kind)return new C(e.context,t);if("InlineFragment"===t.kind)return new j(e.context,t,e.getType());throw new o(l.format("Unexpected selection kind: %s",t.kind),e.getLocation())}):[]},t.getDirectives=function(){var e=this;return(this.ast.directives||[]).map(function(t){return new M(e.context,t)})},t.hasDirective=function(e){return(this.ast.directives||[]).some(function(t){return t.name.value===e})},t.isPattern=function(){return this.context.isPattern},e}(),S=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getName=function(){return this.ast.name?this.ast.name.value:this.getType().getName({modifiers:!1})},t}(F),R=function(e){function t(t,n,i){var a,o={},u=s(n.directives||[],function(e){return"relay"===e.name.value});u&&(u.arguments||[]).forEach(function(e){o[e.name.value]=e.value});var l=o.pattern&&"BooleanValue"===o.pattern.kind&&o.pattern.value;return(a=e.call(this,(0,r.default)({},t,{isPattern:l}),n)||this).parentType=i,a}return(0,a.default)(t,e),t.prototype.getType=function(){var e=this.ast.typeCondition;if(e){for(;"NamedType"!==e.kind;)e=e.type;return new U(this.context,this.context.schema.getType(e.name.value))}if("InlineFragment"===this.ast.kind){if(!this.parentType)throw new o("Cannot get type of typeless inline fragment without parent type.",this.getLocation());return this.parentType}throw new o(l.format("Unexpected fragment kind: %s",this.ast.kind),this.getLocation())},t}(S),Q=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getType=function(){return new U(this.context,this.context.schema.getMutationType())},t}(S),V=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getType=function(){return new U(this.context,this.context.schema.getQueryType())},t}(S),I=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getType=function(){return new U(this.context,this.context.schema.getSubscriptionType())},t}(S),P=function(e){function t(t,n,i){var r,a=(r=e.call(this,t,n)||this).ast.name.value,s=i.getFieldDefinition(a,n);if(!s)throw new o(l.format("You supplied a field named `%s` on type `%s`, but no such field exists on that type.",a,i.getName({modifiers:!1})),r.getLocation());return r.fieldDef=s,r}(0,a.default)(t,e);var n=t.prototype;return n.getName=function(){return this.ast.name.value},n.getAlias=function(){return this.ast.alias?this.ast.alias.value:null},n.getType=function(){return this.fieldDef.getType()},n.hasArgument=function(e){return this.getArguments().some(function(t){return t.getName()===e})},n.findArgument=function(e){return s(this.getArguments(),function(t){return t.getName()===e})},n.getArguments=function(){var e=this,t=this.fieldDef.getDeclaredArguments();return(this.ast.arguments||[]).map(function(n){var i=n.name.value,r=t[i];if(!r)throw new o(l.format("You supplied an argument named `%s` on field `%s`, but no such argument exists on that field.",i,e.getName()),e.getLocation());return new O(e.context,n,r)})},n.hasDeclaredArgument=function(e){return this.fieldDef.getDeclaredArguments().hasOwnProperty(e)},n.getDeclaredArgument=function(e){return this.fieldDef.getArgument(e)},n.getDeclaredArguments=function(){return this.fieldDef.getDeclaredArguments()},t}(F),C=function(e){function t(){return e.apply(this,arguments)||this}(0,a.default)(t,e);var n=t.prototype;return n.getName=function(){return this.ast.name.value},n.getSelections=function(){throw new o("Cannot get selection of a fragment spread.",this.getLocation())},t}(F),j=function(e){function t(t,n,i){var r;return(r=e.call(this,t,n)||this).parentType=i,r}return(0,a.default)(t,e),t.prototype.getFragment=function(){return new R(this.context,this.ast,this.parentType)},t}(F),M=function(){function e(e,t){var n=this;this.ast=t,this.context=e,this.argTypes={};var i=t.name.value,r=i===c.name?c:e.schema.getDirective(i);if(!r)throw new o(l.format("You supplied a directive named `%s`, but no such directive exists.",i),this.getLocation());r.args.forEach(function(e){n.argTypes[e.name]=new B(e.type)})}var t=e.prototype;return t.getLocation=function(){return this.ast.loc},t.getName=function(){return this.ast.name.value},t.getArguments=function(){var e=this;return(this.ast.arguments||[]).map(function(t){var n=t.name.value,i=e.argTypes[n];if(!i)throw new o(l.format("You supplied an argument named `%s` on directive `%s`, but no such argument exists on that directive.",n,e.getName()),e.getLocation());return new O(e.context,t,i)})},e}(),O=function(){function e(e,t,n){this.ast=t,this.context=e,this.type=n}var t=e.prototype;return t.getLocation=function(){return this.ast.loc},t.getName=function(){return this.ast.name.value},t.getType=function(){return this.type},t.isVariable=function(){return"Variable"===this.ast.value.kind},t.getVariableName=function(){if("Variable"!==this.ast.value.kind)throw new o("Cannot get variable name of an argument value.",this.getLocation());return this.ast.value.name.value},t.getValue=function(){var t=this;if(this.isVariable())throw new o("Cannot get value of an argument variable.",this.getLocation());var n=this.ast.value;return"ListValue"===n.kind?n.values.map(function(n){return new e(t.context,(0,r.default)({},t.ast,{value:n}),t.type.ofType())}):Y(n)},e}(),U=function(){function e(e,t){this.context=e;var n=G(t),i=n.isListType,r=n.isNonNullType,a=n.schemaUnmodifiedType;this.isListType=i,this.isNonNullType=r,this.schemaUnmodifiedType=a,this.schemaModifiedType=t}var t=e.prototype;return t.canHaveSubselections=function(){return!(this.schemaUnmodifiedType instanceof x||this.schemaUnmodifiedType instanceof d)},t.getName=function(e){return e.modifiers?this.schemaModifiedType.toString():this.schemaUnmodifiedType.toString()},t.hasField=function(e){return!!this.getFieldDefinition(e)},t.getFieldDefinition=function(e,t){var n,i=this.schemaUnmodifiedType,r=i===this.context.schema.getQueryType(),a=i instanceof w||i instanceof b||i instanceof L,o=i instanceof w||i instanceof b;if(r&&e===k.name?n=k:r&&e===A.name?n=A:a&&e===_.name?n=_:o&&(n=i.getFields()[e]),!n&&D(i)&&t&&t.directives&&t.directives.some(function(e){return"fixme_fat_interface"===e.name.value}))for(var u=this.context.schema.getPossibleTypes(i),l=function(i){var r=u[i].getFields()[e];if(r&&(n=r,t&&t.arguments&&t.arguments.every(function(e){return s(r.args,function(t){return t.name===e.name.value})})))return"break"},c=0;c<u.length;c++){if("break"===l(c))break}return n?new q(this.context,n):null},t.getInterfaces=function(){var t=this;return this.schemaUnmodifiedType instanceof w?this.schemaUnmodifiedType.getInterfaces().map(function(n){return new e(t.context,n)}):[]},t.getConcreteTypes=function(){var t=this;return this.isAbstract()||u(!1,"Cannot get concrete types of a concrete type."),this.context.schema.getPossibleTypes(this.schemaUnmodifiedType).map(function(n){return new e(t.context,n)})},t.getIdentifyingFieldDefinition=function(){return this.alwaysImplements("Node")?this.getFieldDefinition(f):null},t.isAbstract=function(){return D(this.schemaUnmodifiedType)},t.isList=function(){return this.isListType},t.isNonNull=function(){return this.isNonNullType},t.isQueryType=function(){return this.schemaUnmodifiedType===this.context.schema.getQueryType()},t.isConnection=function(){if(!/Connection$/.test(this.getName({modifiers:!1})))return!1;var e=this.getFieldDefinition("edges");if(!e||!e.getType().canHaveSubselections())return!1;var t=e.getType().getFieldDefinition("node");if(!t||!t.getType().canHaveSubselections())return!1;var n=e.getType().getFieldDefinition("cursor");return!(!n||n.getType().canHaveSubselections())},t.isConnectionEdge=function(){return/Edge$/.test(this.getName({modifiers:!1}))&&this.hasField("node")&&this.hasField("cursor")},t.isConnectionPageInfo=function(){return"PageInfo"===this.getName({modifiers:!1})},t.alwaysImplements=function(e){return this.getName({modifiers:!1})===e||this.getInterfaces().some(function(t){return t.getName({modifiers:!1})===e})||this.isAbstract()&&this.getConcreteTypes().every(function(t){return t.alwaysImplements(e)})},t.mayImplement=function(e){return this.getName({modifiers:!1})===e||this.getInterfaces().some(function(t){return t.getName({modifiers:!1})===e})||this.isAbstract()&&this.getConcreteTypes().some(function(t){return t.alwaysImplements(e)})},t.generateField=function(e){var t={kind:"Field",name:{kind:"Name",value:e}};return new P(this.context,t,this)},t.generateIdFragment=function(){return new R(this.context,{kind:"Fragment",name:{kind:"Name",value:"IdFragment"},typeCondition:{kind:"NamedType",name:{value:"Node"}}},this)},e}(),q=function(){function e(e,t){this.context=e,this.schemaFieldDef=t}var t=e.prototype;return t.getName=function(){return this.schemaFieldDef.name},t.getType=function(){return new U(this.context,this.schemaFieldDef.type)},t.hasArgument=function(e){return this.schemaFieldDef.args.some(function(t){return t.name===e})},t.getArgument=function(e){var t=s(this.schemaFieldDef.args,function(t){return t.name===e});return t||u(!1,"You tried to get an argument named `%s` on field `%s`, but no such argument exists on that field.",e,this.getName()),new B(t.type)},t.getDeclaredArguments=function(){var e={};return this.schemaFieldDef.args.forEach(function(t){e[t.name]=new B(t.type)}),e},e}(),B=function(){function e(e){var t=G(e),n=t.isListType,i=t.isNonNullType,r=t.schemaUnmodifiedType;this.isListType=n,this.isNonNullType=i,this.schemaUnmodifiedArgType=r,this.schemaModifiedArgType=e}var t=e.prototype;return t.getName=function(e){return e.modifiers?this.schemaModifiedArgType.toString():this.schemaUnmodifiedArgType.toString()},t.ofType=function(){return this.isList()||this.isNonNull()||u(!1,"Can only get type of list or non-null type."),new e(this.schemaUnmodifiedArgType)},t.isCustomScalar=function(){return this.isScalar()&&!(this.schemaUnmodifiedArgType===m||this.schemaUnmodifiedArgType===g||this.schemaUnmodifiedArgType===h||this.schemaUnmodifiedArgType===y||this.schemaUnmodifiedArgType===E)},t.isBoolean=function(){return this.schemaUnmodifiedArgType===m},t.isEnum=function(){return this.schemaUnmodifiedArgType instanceof d},t.isID=function(){return this.schemaUnmodifiedArgType===h},t.isList=function(){return this.isListType},t.isNonNull=function(){return this.isNonNullType},t.isNumber=function(){return this.schemaUnmodifiedArgType===g||this.schemaUnmodifiedArgType===y},t.isObject=function(){return this.schemaUnmodifiedArgType instanceof v},t.isScalar=function(){return this.schemaUnmodifiedArgType instanceof x},t.isString=function(){return this.schemaUnmodifiedArgType===E},e}();function G(e){for(var t=!1,n=!1,i=e;;){if(i instanceof T)t=!0;else{if(!(i instanceof N))break;n=!0}i=i.ofType}return{isListType:t,isNonNullType:n,schemaUnmodifiedType:i}}function Y(e){switch(e.kind){case"IntValue":return parseInt(e.value,10);case"FloatValue":return parseFloat(e.value);case"StringValue":case"BooleanValue":case"EnumValue":return e.value;case"ListValue":return e.values.map(Y);case"NullValue":return null;case"ObjectValue":var t={};return e.fields.forEach(function(e){t[e.name.value]=Y(e.value)}),t;case"Variable":throw new o(l.format("Unexpected nested variable `%s`; variables are supported as top-level arguments - `node(id: $id)` - or directly within lists - `nodes(ids: [$id])`.",e.name.value),e.loc);default:throw new o(l.format("Unexpected value kind: %s",e.kind),e.loc)}}e.exports={RelayQLArgument:O,RelayQLArgumentType:B,RelayQLDefinition:S,RelayQLDirective:M,RelayQLField:P,RelayQLFieldDefinition:q,RelayQLFragment:R,RelayQLFragmentSpread:C,RelayQLInlineFragment:j,RelayQLMutation:Q,RelayQLNode:F,RelayQLQuery:V,RelayQLSubscription:I,RelayQLType:U}},function(e,t,n){"use strict";var i="directive @relay(\n # Marks a connection field as containing nodes without 'id' fields.\n # This is used to silence the warning when diffing connections.\n isConnectionWithoutNodeID: Boolean,\n\n # Marks a fragment as intended for pattern matching (as opposed to fetching).\n # Used in Classic only.\n pattern: Boolean,\n\n # Marks a fragment as being backed by a GraphQLList.\n plural: Boolean,\n\n # Marks a fragment spread which should be unmasked if provided false\n mask: Boolean = true,\n\n # Selectively pass variables down into a fragment. Only used in Classic.\n variables: [String!],\n) on FRAGMENT_DEFINITION | FRAGMENT_SPREAD | INLINE_FRAGMENT | FIELD",r=(0,n(0).buildSchema)(i+"\ntype Query { x: String }").getDirective("relay");if(!r)throw new Error("Failed to create GraphQLRelayDirective.");e.exports={SCHEMA_EXTENSION:i,GraphQLRelayDirective:r}},function(e,t,n){"use strict";e.exports={ID:"id"}},function(module,exports,__webpack_require__){"use strict";var _interopRequireDefault=__webpack_require__(3),_objectSpread2=_interopRequireDefault(__webpack_require__(4)),compileGraphQLTag=__webpack_require__(16),compileRelayQLTag=__webpack_require__(7),getDocumentName=__webpack_require__(31),getValidGraphQLTag=__webpack_require__(32),getValidRelayQLTag=__webpack_require__(33),invariant=__webpack_require__(2),RelayConfig;try{RelayConfig=eval("require")("relay-config")}catch(e){}module.exports=function(e){var t=e.types;if(!t)throw new Error('BabelPluginRelay: Expected plugin context to include "types", but got:'+String(e));var n={TaggedTemplateExpression:function(e,n){var i=getValidGraphQLTag(e);if(i)compileGraphQLTag(t,e,n,i);else{var r=getValidRelayQLTag(e),a=r[0],o=r[1],s=r[2];if(a&&o){var u=n.opts&&n.opts.schema;u||invariant(!1,'babel-plugin-relay: Missing schema option. Check your .babelrc file or wherever you configure your Babel plugins to ensure the "relay" plugin has a "schema" option.\nhttps://relay.dev/docs/en/installation-and-setup#set-up-babel-plugin-relay');var l=getDocumentName(e,n);e.replaceWith(compileRelayQLTag(t,e,u,a,l,s,o,!0,n))}}}};return{visitor:{Program:function(e,t){var i=RelayConfig&&RelayConfig.loadConfig();e.traverse(n,(0,_objectSpread2.default)({},t,{opts:(0,_objectSpread2.default)({},i,t.opts)}))}}}}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";var i=n(17),r=n(28),a=n(29);e.exports=function(e,t,n,o){if(1!==o.definitions.length)throw new Error("BabelPluginRelay: Expected exactly one definition per graphql tag.");var s=o.definitions[0];if("FragmentDefinition"!==s.kind&&"OperationDefinition"!==s.kind)throw new Error("BabelPluginRelay: Expected a fragment, mutation, query, or subscription, got `"+s.kind+"`.");return function(e,t,n){for(var i=t.scope;i.parent;)i=i.parent;if(t.scope===i)t.replaceWith(n);else{var r=i.generateDeclaredUidIdentifier("graphql");t.replaceWith(e.logicalExpression("||",r,e.assignmentExpression("=",r,n)))}}(e,t,function(e,t,n,o){var s=Boolean(t.opts&&t.opts.compat),u=Boolean(t.opts&&t.opts.haste),l=t.opts&&t.opts.isDevVariable,c=t.opts&&t.opts.artifactDirectory,f=t.opts&&t.opts.buildCommand||"relay-compiler",p="production"!==(process.env.BABEL_ENV||"development"),m=a(e,o,t,{artifactDirectory:c,buildCommand:f,isDevelopment:p,isHasteMode:u,isDevVariable:l});return s?r(e,m,i(e,n,o,t)):m}(e,n,t,s))}},function(e,t,n){"use strict";var i=n(0),r=n(7),a=n(8),o=n(27),s=n(2);function u(e,t){var n=0,r={},a={},o=null,u={Directive:function(e){switch(e.name.value){case"inline":throw new Error("@inline is only available in pure RelayModern mode.");case"argumentDefinitions":if(o)throw new Error("BabelPluginRelay: Expected only one @argumentDefinitions directive");return o=e.arguments,null;case"connection":return null;default:return e}},FragmentSpread:function(t){var i=t.directives,o=t.name.value,u=null,l=null,c=!0;if(0===i.length)l=o;else{var f=i[0];switch(1!==i.length&&s(!1,"BabelPluginRelay: Cannot use both `@arguments` and `@relay(mask: false)` on the same fragment spread when in compat mode."),f.name.value){case"arguments":case"uncheckedArguments_DEPRECATED":var p={};f.arguments.forEach(function(t){var n=t.value;"Variable"===n.kind&&(a[n.name.value]=null);var i=function(e,t){var n=t.name.value,i=t.value,r=null;switch(i.kind){case"Variable":var a=i.name.value;r=g(e,{kind:e.stringLiteral("CallVariable"),callVariableName:e.stringLiteral(a)});break;default:r=d(e,i)}return{name:n,ast:r}}(e,t);p[i.name]=i.ast}),u=g(e,p),l=o+"_args"+ ++n;break;case"relay":var m=f.arguments;(1!==m.length||"mask"!==m[0].name.value)&&s(!1,"BabelPluginRelay: Expected `@relay` directive to only have `mask` argument in compat mode, but get %s",m[0].name.value),l=o,c=!1!==m[0].value.value;break;default:throw new Error("BabelPluginRelay: Unsupported directive `"+f.name.value+"` on fragment spread `..."+o+"`.")}}return l||s(!1,"BabelPluginRelay: Expected `substitutionName` to be non-null"),r[l]={name:o,args:u,isMasked:c},Object.assign({},t,{name:{kind:"Name",value:l},directives:[]})},Variable:function(e){return a[e.name.value]=null,e}};return{classicAST:i.visit(t,u),fragments:r,variables:a,argumentDefinitions:o}}var l="RelayQL_GENERATED";function c(e,t,n,i){var r=[e.returnStatement(t)];return n.length>0&&r.unshift(e.variableDeclaration("const",n)),e.functionExpression(null,[e.identifier(l)],e.blockStatement(r))}function f(e,t){return t?e.arrayExpression(t.map(function(t){var n=t.variable.name.value,i=t.defaultValue?d(e,t.defaultValue):e.nullLiteral();return m(e,n,i)})):e.arrayExpression([])}function p(e,t,n){var i=[];return Object.keys(n).forEach(function(n){var r=(t||[]).find(function(e){return e.name.value===n});if(r){var a=r.value.fields.find(function(e){return"defaultValue"===e.name.value}),o=a?d(e,a.value):e.nullLiteral();i.push(m(e,n,o))}else i.push(function(e,t){return e.objectExpression([e.objectProperty(e.identifier("kind"),e.stringLiteral("RootArgument")),e.objectProperty(e.identifier("name"),e.stringLiteral(t))])}(e,n))}),e.arrayExpression(i)}function m(e,t,n){return g(e,{defaultValue:n,kind:e.stringLiteral("LocalArgument"),name:e.stringLiteral(t)})}function d(e,t){switch(t.kind){case"BooleanValue":return e.booleanLiteral(t.value);case"IntValue":return e.numericLiteral(parseInt(t.value,10));case"FloatValue":return e.numericLiteral(parseFloat(t.value));case"StringValue":case"EnumValue":return e.stringLiteral(t.value);case"ListValue":return e.arrayExpression(t.values.map(function(t){return d(e,t)}));default:throw new Error("BabelPluginRelay: Unsupported literal type `"+t.kind+"`.")}}function g(e,t){return e.objectExpression(Object.keys(t).map(function(n){return e.objectProperty(e.identifier(n),t[n])}))}function h(e){var t=e.opts&&e.opts.schema;return t||s(!1,'babel-plugin-relay: Missing schema option. Check your .babelrc file or wherever you configure your Babel plugins to ensure the "relay" plugin has a "schema" option.\nhttps://relay.dev/docs/en/installation-and-setup#set-up-babel-plugin-relay'),t}function v(e,t,n,a){var s=h(a),u=o(n.name.value),c=u[0],f=u[1],p=i.print(n),m=e.templateLiteral([e.templateElement({raw:p,cooked:p},!0)],[]);return r(e,t,s,m,c,f,l,!1,a)}function y(e,t,n){return Object.keys(n).map(function(i){var r=n[i],a=o(r.name),u=a[0],c=a[1];if(r.isMasked)return e.variableDeclarator(e.identifier(i),function(e,t,n,i,r){var a=[];i&&a.push(e.stringLiteral(i));r&&a.push(r);var o=function(e,t){var n=e.scope.getBinding(t);if(!n)return!1;if("module"===n.kind)return!1;if(n.path.isVariableDeclarator()&&n.path.get("init").node&&n.path.get("init.callee").isIdentifier({name:"require"}))return!1;return!0}(t,n)?e.logicalExpression("||",e.memberExpression(e.identifier(n),e.identifier("__container__")),e.identifier(n)):e.identifier(n);return e.callExpression(e.memberExpression(o,e.identifier("getFragment")),a)}(e,t,u,c,r.args));t.scope.hasBinding(u)||t.scope.hasBinding(c)||s(!1,"BabelPluginRelay: Please make sure module '".concat(u,"' is imported and not renamed or the\n fragment '").concat(r.name,"' is defined and bound to local variable '").concat(c,"'. "));var f=t.scope.hasBinding(c)?e.memberExpression(e.identifier(c),e.identifier(c)):e.logicalExpression("||",e.memberExpression(e.memberExpression(e.identifier(u),e.identifier(c)),e.identifier(c)),e.memberExpression(e.identifier(u),e.identifier(c)));return e.variableDeclarator(e.identifier(i),e.memberExpression(e.callExpression(e.memberExpression(e.identifier(l),e.identifier("__getClassicFragment")),[f,e.booleanLiteral(!0)]),e.identifier("node")))})}e.exports=function(e,t,n,i){if("FragmentDefinition"===n.kind)return function(e,t,n,i){var r=u(e,n),a=r.classicAST,o=r.fragments,s=r.variables,l=r.argumentDefinitions,f=y(e,t,o),m=g(e,{kind:e.stringLiteral("FragmentDefinition"),argumentDefinitions:p(e,l,s),node:v(e,t,a,i)});return c(e,m,f)}(e,t,n,i);if("OperationDefinition"===n.kind)return function(e,t,n,i){var r=n.name;if(!r)throw new Error("GraphQL operations must contain names");var o=u(e,n),s=o.classicAST,l=o.fragments,p=y(e,t,l),m="query"===s.operation?function(e,t,n,i){var r,o=h(i),s=i.file&&i.file.opts||{},u=a(o,i.opts||{},s);switch(n.operation){case"query":var l=u.schema.getQueryType();if(!l)throw new Error("Schema does not contain a root query type.");r=l.name;break;case"mutation":var c=u.schema.getMutationType();if(!c)throw new Error("Schema does not contain a root mutation type.");r=c.name;break;case"subscription":var f=u.schema.getSubscriptionType();if(!f)throw new Error("Schema does not contain a root subscription type.");r=f.name;break;default:throw new Error("BabelPluginRelay: Unexpected operation type: `"+n.operation+"`.")}var p={kind:"FragmentDefinition",loc:n.loc,name:{kind:"Name",value:n.name.value},typeCondition:{kind:"NamedType",name:{kind:"Name",value:r}},directives:n.directives,selectionSet:n.selectionSet};return v(e,t,p,i)}(e,t,s,i):v(e,t,s,i),d=g(e,{kind:e.stringLiteral("OperationDefinition"),argumentDefinitions:f(e,n.variableDefinitions),name:e.stringLiteral(r.value),operation:e.stringLiteral(s.operation),node:m});return c(e,d,p)}(e,t,n,i);throw new Error("BabelPluginRelay: Expected a fragment, mutation, query, or subscription, got `"+n.kind+"`.")}},function(e,t,n){"use strict";var i=n(5),r=n(1);e.exports=function(e){if(e instanceof i)return"Relay Transform Error: ".concat(e.message);var t=e.sourceText,n=e.validationErrors;if(n&&t){var a=t.split("\n");return n.map(function(e){return"GraphQL Validation Error: "+e.message+"\n"+e.locations.map(function(e){var t=a[e.line-1];return t&&[">","> "+t,"> "+" ".repeat(e.column-1)+"^^^"].join("\n")}).filter(Boolean).join("\n")}).join("\n")}return r.format("Relay Transform Error: %s\n\n%s",e.message,e.stack)}},function(e,t,n){"use strict";var i=n(20),r=n(2),a=n(1),o=n(11),s=o.RelayQLFragment,u=o.RelayQLMutation,l=o.RelayQLQuery,c=o.RelayQLSubscription,f=n(0),p=f.formatError,m=f.parse,d=f.Source,g=f.validate,h=f.FieldsOnCorrectTypeRule,v=f.FragmentsOnCompositeTypesRule,y=f.KnownArgumentNamesRule,b=f.KnownTypeNamesRule,T=f.PossibleFragmentSpreadsRule,N=f.ValuesOfCorrectTypeRule,w=f.VariablesInAllowedPositionRule,x=function(){function e(e,t){this.schema=e,this.options=t}var t=e.prototype;return t.transform=function(e,t,n){var r=this.processTemplateLiteral(t,n.documentName),a=r.substitutions,o=r.templateText,s=r.variableNames,u=this.processTemplateText(o,n),l=this.processDocumentText(u,n);return new(i(e,this.options))(n.tagName,s).print(l,a,n.enableValidation)},t.processTemplateLiteral=function(e,t){var n=this,i=[],a={},o=[];return e.quasis.forEach(function(s,u){var l=s.value.cooked;if(i.push(l),!s.tail){var c="RQL_"+u,f=e.expressions[u];o.push({name:c,value:f}),/:\s*$/.test(l)?(n.options.substituteVariables||r(!1,"You supplied a GraphQL document named `%s` that uses template substitution for an argument value, but variable substitution has not been enabled.",t),i.push("$"+c),a[c]=void 0):i.push("..."+c)}}),{substitutions:o,templateText:i.join("").trim(),variableNames:a}},t.processTemplateText=function(e,t){var n=t.documentName,i=t.propName,a=/^(fragment|mutation|query|subscription)\s*(\w*)?([\s\S]*)/.exec(e);a||r(!1,"You supplied a GraphQL document named `%s` with invalid syntax. It must start with `fragment`, `mutation`, `query`, or `subscription`.",n);var o=a[1],s=a[2]||n,u=a[3];return"fragment"===o&&"on"===s&&(s=n+(i?"_"+E(i):"")+"RelayQL",u="on"+u),o+" "+E(s)+" "+u},t.processDocumentText=function(e,t){var n=t.documentName,i=t.enableValidation,o=m(new d(e,n)),f=i?this.validateDocument(o,n):null;if(f){var p=new Error(a.format("You supplied a GraphQL document named `%s` with validation errors.",n));throw p.validationErrors=f,p.sourceText=e,p}var g,h=o.definitions[0],v={definitionName:E(n),isPattern:!1,generateID:(g=0,function(){return(g++).toString(32)}),schema:this.schema};if("FragmentDefinition"===h.kind)return new s(v,h);if("OperationDefinition"===h.kind){if("mutation"===h.operation)return new u(v,h);if("query"===h.operation)return new l(v,h);if("subscription"===h.operation)return new c(v,h);r(!1,"Unsupported operation: %s",h.operation)}else r(!1,"Unsupported definition kind: %s",h.kind)},t.validateDocument=function(e,t){1!==e.definitions.length&&r(!1,"You supplied a GraphQL document named `%s` with %d definitions, but it must have exactly one definition.",t,e.definitions.length);var n,i=this.options.validator;if(i)n=i().validate(this.schema,e);else{var a=[h,v,y,b,T,N,w];n=g(this.schema,e,a)}return n&&n.length>0?n.map(p):null},e}();function E(e){return e[0].toUpperCase()+e.slice(1)}e.exports=x},function(e,t,n){"use strict";var i=n(3),r=i(n(4)),a=i(n(9)),o=n(5),s=n(10),u=n(1),l=n(11),c=l.RelayQLField,f=l.RelayQLFragment,p=l.RelayQLFragmentSpread,m=l.RelayQLInlineFragment,d=l.RelayQLMutation,g=l.RelayQLQuery,h=l.RelayQLSubscription,v=n(13).ID;e.exports=function(e,t){var n=t.snakeCase?function(e){var t={};return Object.keys(e).forEach(function(e){t[e]=e.replace(/[A-Z]/g,function(e){return"_"+e.toLowerCase()})}),t}:function(e){return e},i=e.arrayExpression([]),l=n({__typename:"__typename",clientMutationId:"clientMutationId",clientSubscriptionId:"clientSubscriptionId",cursor:"cursor",edges:"edges",hasNextPage:"hasNextPage",hasPreviousPage:"hasPreviousPage",node:"node",pageInfo:"pageInfo"}),y=t.inputArgumentName||"input",b=e.nullLiteral(),T=function(){function t(e,t){this.tagName=e,this.variableNames=t}var n=t.prototype;return n.print=function(t,n){var i,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t instanceof g)i=this.printQuery(t,r);else if(t instanceof f)i=this.printFragment(t);else if(t instanceof d)i=this.printMutation(t,r);else{if(!(t instanceof h))throw new o(u.format("Unsupported definition: %s",t),t.getLocation());i=this.printSubscription(t,r)}return e.callExpression(e.functionExpression(null,n.map(function(t){return e.identifier(t.name)}),e.blockStatement([e.returnStatement(i)])),n.map(function(e){return e.value}))},n.printQuery=function(t,n){var i=t.getFields();if(1!==i.length&&n)throw new o(u.format("There are %d fields supplied to the query named `%s`, but queries must have exactly one field.",i.length,t.getName()),t.getLocation());var r=i[0],a=r.getType(),s=r.getArguments(),c={},f=a.getIdentifyingFieldDefinition();f&&(c[f.getName()]=!0),a.isAbstract()&&(c[l.__typename]=!0);var p=this.printSelections(r,c),m={};if(a.isList()&&(m.isPlural=!0),a.isAbstract()&&(m.isAbstract=!0),s.length>1)throw new o(u.format("Invalid root field `%s`; Relay only supports root fields with zero or one argument.",r.getName()),t.getLocation());var d=b;if(1===s.length){var g=s[0],h=g.getName(),v=g.getType().getName({modifiers:!0});m.identifyingArgName=h,m.identifyingArgType=v,d=e.arrayExpression([E({kind:e.valueToNode("Call"),metadata:D({type:v}),name:e.valueToNode(h),value:this.printArgumentValue(g)})])}return E({calls:d,children:p,directives:this.printDirectives(r.getDirectives()),fieldName:e.valueToNode(r.getName()),kind:e.valueToNode("Query"),metadata:D(m),name:e.valueToNode(t.getName()),type:e.valueToNode(a.getName({modifiers:!1}))})},n.printFragment=function(t){var n,i=this,r=t.getType(),a={};r.hasField(v)?a[v]=!0:N(t)&&(n=r.generateIdFragment()),r.isAbstract()&&(a[l.__typename]=!0);var u=this.printSelections(t,a,n?[n]:null,t.hasDirective("generated")),c=_(t),f=c&&s(c.getArguments(),function(e){return"variables"===e.getName()}),p=this.printRelayDirectiveMetadata(t,{isAbstract:r.isAbstract(),isTrackingEnabled:!!f}),m=E({children:u,directives:this.printDirectives(t.getDirectives()),id:this.printFragmentID(t),kind:e.valueToNode("Fragment"),metadata:p,name:e.valueToNode(t.getName()),type:e.valueToNode(r.getName({modifiers:!1}))});if(f){var d=f.getValue();if(!Array.isArray(d))throw new o("The variables argument to the @relay directive should be an array of strings.",t.getLocation());return e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__createFragment")),[m,e.objectExpression(d.map(function(e){var t=e.getValue();return k(t,i.printVariable(t))}))])}return m},n.printFragmentID=function(t){return e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__id")),[])},n.printMutation=function(t,n){var i=t.getFields();if(1!==i.length&&n)throw new o(u.format("There are %d fields supplied to the mutation named `%s`, but mutations must have exactly one field.",i.length,t.getName()),t.getLocation());var r=i[0],a=r.getType();w(r);var s={};a.hasField(l.clientMutationId)&&(s[l.clientMutationId]=!0);var c=this.printSelections(r,s),f={inputType:this.printArgumentTypeForMetadata(r.getDeclaredArgument(y))};return E({calls:e.arrayExpression([E({kind:e.valueToNode("Call"),metadata:D({}),name:e.valueToNode(r.getName()),value:this.printVariable("input")})]),children:c,directives:this.printDirectives(t.getDirectives()),kind:e.valueToNode("Mutation"),metadata:D(f),name:e.valueToNode(t.getName()),responseType:e.valueToNode(a.getName({modifiers:!1}))})},n.printSubscription=function(t,n){var i=t.getFields();if(1!==i.length&&n)throw new o(u.format("There are %d fields supplied to the subscription named `%s`, but subscriptions must have exactly one field.",i.length,t.getName()),t.getLocation());var r=i[0],a=r.getType();w(r);var s={};a.hasField(l.clientSubscriptionId)&&(s[l.clientSubscriptionId]=!0),a.hasField(l.clientMutationId)&&(s[l.clientMutationId]=!0);var c=this.printSelections(r,s),f={inputType:this.printArgumentTypeForMetadata(r.getDeclaredArgument(y))};return E({calls:e.arrayExpression([E({kind:e.valueToNode("Call"),metadata:D({}),name:e.valueToNode(r.getName()),value:this.printVariable("input")})]),children:c,directives:this.printDirectives(t.getDirectives()),kind:e.valueToNode("Subscription"),metadata:D(f),name:e.valueToNode(t.getName()),responseType:e.valueToNode(a.getName({modifiers:!1}))})},n.printSelections=function(t,n,r){var s=this,l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],f=[],d=[],g=!1;t.getSelections().forEach(function(e){if(e instanceof p){if(0!==e.getDirectives().length)throw new o("Directives are not yet supported for `${fragment}`-style fragment references.",e.getLocation());d.push(s.printFragmentReference(e)),g=!0}else if(e instanceof m)d.push(s.printFragment(e.getFragment()));else{if(!(e instanceof c))throw new o(u.format("Unsupported selection type `%s`.",e),e.getLocation());f.push(e)}}),r&&r.forEach(function(e){d.push(s.printFragment(e))});var h,v=this.printFields(f,t,n,l),y=[].concat((0,a.default)(v),d);if(y.length){var T=e.arrayExpression(y);return g?(h=T,e.callExpression(e.memberExpression(e.memberExpression(i,e.identifier("concat")),e.identifier("apply")),[i,h])):T}return b},n.printFields=function(e,t,n){var i=this,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=t.getType();o.isConnection()&&o.hasField(l.pageInfo)&&e.some(function(e){return e.getName()===l.edges})&&(n[l.pageInfo]=!0);var s=(0,r.default)({},n),u=[];return e.forEach(function(e){delete s[e.getName()],u.push(i.printField(e,t,n,s,a))}),Object.keys(s).forEach(function(e){var r=o.generateField(e);u.push(i.printField(r,t,n,s,a))}),u},n.printField=function(t,n,i,r){var a,s=this,c=arguments.length>4&&void 0!==arguments[4]&&arguments[4],f=t.getType(),p={},m={};f.hasField(v)?m[v]=!0:N(t)&&(a=f.generateIdFragment()),c||function(e,t){if("node"===e.getName()){var n=e.getDeclaredArguments(),i=Object.keys(n);if(!t.isQueryType()&&1===i.length&&i[0]===v)throw new o(u.format("You defined a `node(%s: %s)` field on type `%s`, but Relay requires the `node` field to be defined on the root type. See the Object Identification Guide: \nhttps://relay.dev/docs/en/graphql-server-specification#object-identification",v,i[0]&&n[i[0]].getName({modifiers:!0}),t.getName({modifiers:!1})),e.getLocation())}}(t,n.getType()),f.canHaveSubselections()&&(p.canHaveSubselections=!0),f.alwaysImplements("Node")&&(p.inferredRootCallName="node",p.inferredPrimaryKey=v),f.isConnection()?(t.hasDeclaredArgument("first")||t.hasDeclaredArgument("last"))&&(c||function(e){var t=[e.findArgument("first"),e.findArgument("last"),e.findArgument("before"),e.findArgument("after")],n=t[0],i=t[1],r=t[2],a=t[3],s=!n||!i||n.isVariable()&&i.isVariable();if(!s)throw new o(u.format("Connection arguments `%s(first: <count>, last: <count>)` are not supported unless both are variables. Use `(first: <count>)`, `(last: <count>)`, or `(first: $<var>, last: $<var>)`.",e.getName()),e.getLocation());if(!(s=!n||!r||n.isVariable()&&r.isVariable()))throw new o(u.format("Connection arguments `%s(before: <cursor>, first: <count>)` are not supported unless both are variables. Use `(first: <count>)`, `(after: <cursor>, first: <count>)`, `(before: <cursor>, last: <count>)`, or `(before: $<var>, first: $<var>)`.",e.getName()),e.getLocation());if(!(s=!i||!a||i.isVariable()&&a.isVariable()))throw new o(u.format("Connection arguments `%s(after: <cursor>, last: <count>)` are not supported unless both are variables. Use `(last: <count>)`, `(before: <cursor>, last: <count>)`, `(after: <cursor>, first: <count>)`, or `(after: $<var>, last: $<var>)`.",e.getName()),e.getLocation());var c=e.getType().getFieldDefinition(l.edges).getType().getFieldDefinition(l.node).getType();x(e,function(t){if(t.getName()===l.edges||t.getName()===l.pageInfo){var n=e.isPattern()||e.hasArgument("find")||e.hasArgument("first")||e.hasArgument("last");if(!n)throw new o(u.format("You supplied the `%s` field on a connection named `%s`, but you did not supply an argument necessary for Relay to handle the connection. Please specify a limit argument like `first`, or `last` or fetch a specific item with a `find` argument.",t.getName(),e.getName()),e.getLocation())}else{var i=t.getType(),r=i.isList()&&i.getName({modifiers:!1})===c.getName({modifiers:!1});if(r)throw new o(u.format("You supplied a field named `%s` on a connection named `%s`, but pagination is not supported on connections without using `%s`. Use `%s{%s{%s{...}}}` instead.",t.getName(),e.getName(),l.edges,e.getName(),l.edges,l.node),e.getLocation())}})}(t),p.isConnection=!0,t.hasDeclaredArgument("find")&&(p.isFindable=!0)):f.isConnectionPageInfo()?(m[l.hasNextPage]=!0,m[l.hasPreviousPage]=!0):f.isConnectionEdge()&&(m[l.cursor]=!0,m[l.node]=!0),f.isAbstract()&&(p.isAbstract=!0,m[l.__typename]=!0),f.isList()&&(p.isPlural=!0),r.hasOwnProperty(t.getName())&&(p.isGenerated=!0),i.hasOwnProperty(t.getName())&&(p.isRequisite=!0);var d=this.printSelections(t,m,a?[a]:null,c),g=t.getAlias(),h=t.getArguments(),y=h.length?e.arrayExpression(h.map(function(e){return s.printArgument(e)})):b;return E({alias:g?e.valueToNode(g):b,calls:y,children:d,directives:this.printDirectives(t.getDirectives()),fieldName:e.valueToNode(t.getName()),kind:e.valueToNode("Field"),metadata:this.printRelayDirectiveMetadata(t,p),type:e.valueToNode(f.getName({modifiers:!1}))})},n.printFragmentReference=function(t){return e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__frag")),[e.identifier(t.getName())])},n.printArgument=function(t){var n={},i=this.printArgumentTypeForMetadata(t.getType());return i&&(n.type=i),E({kind:e.valueToNode("Call"),metadata:D(n),name:e.valueToNode(t.getName()),value:this.printArgumentValue(t)})},n.printArgumentValue=function(e){return e.isVariable()?this.printVariable(e.getVariableName()):this.printValue(e.getValue())},n.printVariable=function(t){return this.variableNames.hasOwnProperty(t)?e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__var")),[e.identifier(t)]):E({kind:e.valueToNode("CallVariable"),callVariableName:e.valueToNode(t)})},n.printValue=function(t){var n=this;return Array.isArray(t)?e.arrayExpression(t.map(function(e){return n.printArgumentValue(e)})):E({kind:e.valueToNode("CallValue"),callValue:null==t?e.nullLiteral():A(t)})},n.printDirectives=function(t){var n=this,i=[];return t.forEach(function(t){"relay"!==t.getName()&&i.push(e.objectExpression([k("kind",e.valueToNode("Directive")),k("name",e.valueToNode(t.getName())),k("args",e.arrayExpression(t.getArguments().map(function(t){return e.objectExpression([k("name",e.valueToNode(t.getName())),k("value",n.printArgumentValue(t))])})))]))}),i.length?e.arrayExpression(i):b},n.printRelayDirectiveMetadata=function(t,n){var i=[],r=_(t);if(r&&r.getArguments().forEach(function(n){if(n.isVariable())throw new o(u.format("You supplied `$%s` as the `%s` argument to the `@relay` directive, but `@relay` require scalar argument values.",n.getVariableName(),n.getName()),t.getLocation());"variables"!==n.getName()&&i.push(k(n.getName(),e.valueToNode(n.getValue())))}),n){var a=n;Object.keys(a).forEach(function(t){a[t]&&i.push(k(t,e.valueToNode(a[t])))})}return e.objectExpression(i)},n.printArgumentTypeForMetadata=function(e){return e.isBoolean()||e.isID()||e.isString()?null:e.getName({modifiers:!0})},t}();function N(e){return e.getType().mayImplement("Node")&&!e.getSelections().some(function(e){return e instanceof m&&"Node"===e.getFragment().getType().getName({modifiers:!1})})}function w(e){var t=e.getDeclaredArguments(),n=Object.keys(t);if(1!==n.length)throw new o(u.format("Your schema defines a mutation field `%s` that takes %d arguments, but mutation fields must have exactly one argument named `%s`.",e.getName(),n.length,y),e.getLocation());if(n[0]!==y)throw new o(u.format("Your schema defines a mutation field `%s` that takes an argument named `%s`, but mutation fields must have exactly one argument named `%s`.",e.getName(),n[0],y),e.getLocation());var i=e.getArguments();if(i.length>1)throw new o(u.format("There are %d arguments supplied to the mutation field named `%s`, but mutation fields must have exactly one `%s` argument.",i.length,e.getName(),y),e.getLocation())}var x=function e(t,n){t.getSelections().forEach(function(t){t instanceof c?n(t):t instanceof m&&e(t.getFragment(),n)})};function E(t){var n=[];return Object.keys(t).forEach(function(e){var i=t[e];i!==b&&n.push(k(e,i))}),e.objectExpression(n)}function L(t){return t.split(".").reduce(function(t,n){return t?e.memberExpression(t,e.identifier(n)):e.identifier(n)},null)}function D(t){var n=[];return Object.keys(t).forEach(function(i){var r=t[i];r&&n.push(k(i,e.valueToNode(r)))}),e.objectExpression(n)}function k(t,n){return e.objectProperty(e.identifier(t),n)}function A(t){if(null==t)return b;if(Array.isArray(t))return e.arrayExpression(t.map(A));if("object"==typeof t&&null!=t){var n=t;return e.objectExpression(Object.keys(n).map(function(e){return k(e,A(n[e]))}))}return e.valueToNode(t)}function _(e){return s(e.getDirectives(),function(e){return"relay"===e.getName()})}return T}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";var i=n(12).SCHEMA_EXTENSION,r=n(26),a=n(0).parse,o=n(6);function s(e,t){var n=!r.existsSync(e)&&t?o.join(t,e):e;return r.readFileSync(n,"utf8")}e.exports=function(e,t){try{var n=e.split(",");if(n.length>1)return a(i+"\n"+n.map(function(e){return s(e,t)}).join("\n"));var r=s(e,t);return"{"===r[0]?JSON.parse(r):a(i+"\n"+r)}catch(t){throw console.error("Encountered the following error while loading the GraphQL schema: "+e+"\n\n"+t.stack.split("\n").map(function(e){return"> "+e}).join("\n")),t}}},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";var i="data";e.exports=function(e){var t=e.match(/^([a-zA-Z][a-zA-Z0-9]*)(?:_([a-zA-Z][_a-zA-Z0-9]*))?$/);if(!t)throw new Error("BabelPluginGraphQL: Fragments should be named `ModuleName_fragmentName`, got `"+e+"`.");var n=t[1],r=t[2];if(r===i)throw new Error("BabelPluginGraphQL: Fragment `"+e+"` should not end in `_data` to avoid conflict with a fragment named `"+n+"` which also provides resulting data via the React prop `data`. Either rename this fragment to `"+n+"` or choose a different prop name.");return[n,r||i]}},function(e,t,n){"use strict";e.exports=function(e,t,n){return e.objectExpression([e.objectProperty(e.identifier("modern"),t),e.objectProperty(e.identifier("classic"),n)])}},function(e,t,n){"use strict";var i=n(3)(n(9)),r=n(30),a=n(2),o=n(6),s=n(0).print,u="./__generated__/";function l(e,t,n){return e.callExpression(e.memberExpression(e.identifier("console"),e.identifier("error")),[e.stringLiteral("The definition of '".concat(t,"' appears to have changed. Run ")+"`"+n+"` to update the generated files to receive the expected data.")])}e.exports=function(e,t,n,c){var f=t.name&&t.name.value;if(!f)throw new Error("GraphQL operations and fragments must contain names");var p=f+".graphql",m=c.isHasteMode?p:c.artifactDirectory?function(e,t,n){null==e.file&&a(!1,"babel state file is null");var i=e.file.opts.filename,r=o.relative(o.dirname(i),o.resolve(t));return(0!==r.length&&r.startsWith(".")?"":"./")+o.join(r,n)}(n,c.artifactDirectory,p):u+p,d=r.createHash("md5").update(s(t),"utf8").digest("hex"),g=e.callExpression(e.identifier("require"),[e.stringLiteral(m)]),h=[e.returnStatement(g)];if(null!=c.isDevVariable||c.isDevelopment){var v=e.identifier("node"),y=e.memberExpression(v,e.identifier("hash")),b=[e.variableDeclaration("const",[e.variableDeclarator(v,g)]),e.ifStatement(e.logicalExpression("&&",y,e.binaryExpression("!==",y,e.stringLiteral(d))),e.blockStatement([e.expressionStatement(l(e,f,c.buildCommand))]))];null!=c.isDevVariable&&(b=[e.ifStatement(e.identifier(c.isDevVariable),e.blockStatement(b))]),h.unshift.apply(h,(0,i.default)(b))}return e.functionExpression(null,[],e.blockStatement(h))}},function(e,t){e.exports=require("crypto")},function(e,t,n){"use strict";var i=n(6).basename,r="providesModule";e.exports=function(e,t){for(var n=e;n.parentPath;)n=n.parentPath;var a=n.documentName;if(!a){var o=n.parent;if(o.comments&&o.comments.length)for(var s,u=o.comments[0].value||"",l=/@(\S+) *(\S*)/g;s=l.exec(u);){var c=s[1],f=s[2];if(c===r){a=f.replace(/[\.-:]/g,"_");break}}var p=t.file&&t.file.opts&&t.file.opts.filename&&i(t.file.opts.filename);if(p&&!a){var m=p.match(/^[_A-Za-z][_0-9A-Za-z]*/);m&&(a=m[0])}a=a||"UnknownFile",n.documentName=a}return a}},function(e,t,n){"use strict";var i=n(0);e.exports=function(e){if(!e.get("tag").isIdentifier({name:"graphql"}))return null;var t=e.node.quasi.quasis;if(1!==t.length)throw new Error("BabelPluginRelay: Substitutions are not allowed in graphql fragments. Included fragments should be referenced as `...MyModule_propName`.");var n=t[0].value.raw,r=i.parse(n);if(0===r.definitions.length)throw new Error("BabelPluginRelay: Unexpected empty graphql tag.");return r}},function(e,t,n){"use strict";e.exports=function(e){var t=e.node,n=e.get("tag"),i=n.matchesPattern("Relay.QL")?"Relay.QL":n.matchesPattern("RelayClassic_DEPRECATED.QL")?"RelayClassic_DEPRECATED.QL":n.matchesPattern("RelayClassic.QL")?"RelayClassic.QL":n.isIdentifier({name:"RelayQL"})?"RelayQL":null;if(!i)return[null,null,null];for(var r=e,a=null;!a&&(r=r.parentPath);)r.isProperty()&&(a=r.node.key.name);return[t.quasi,i,a]}}]);
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Relay v4.0.0
2
+ * Relay v5.0.0
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
5
5
  *
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- module.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}([function(e,t){e.exports=require("graphql")},function(e,t){e.exports=require("util")},function(e,t,n){"use strict";var i=n(1);e.exports=function(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];throw new Error(i.format.apply(i,[t].concat(r)))}}},function(e,t,n){"use strict";e.exports=function(e,t){this.message=e,this.loc=t,this.stack=(new Error).stack}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=require("path")},function(e,t,n){"use strict";var i=n(17),r=n(7);e.exports=function(e,t,n,a,o,s,u,c,l){try{var f=l.file&&l.file.opts||{};return r(n,l.opts||{},f).transform(e,a,{documentName:o,propName:s,tagName:u,enableValidation:c})}catch(e){throw t.buildCodeFrameError(i(e),Error)}}},function(e,t,n){"use strict";var i=n(18),r=n(25),a=n(0),o=a.buildASTSchema,s=a.buildClientSchema,u=new Map;e.exports=function(e,t,n){var a=u.get(e);if(!a){var c=function(e,t){var n="function"==typeof e?e():e,i="string"==typeof n?r(n,t.sourceRoot):n;if(i.__schema)return s(i);if(i.data&&i.data.__schema)return s(i.data);if(i.kind&&"Document"===i.kind)return o(i,{assumeValid:!0});throw new Error("Invalid introspection data supplied to babel-plugin-relay. The resulting schema is not an object with a `__schema` property or a schema IDL language.")}(e,n);a=new i(c,{inputArgumentName:t.inputArgumentName,snakeCase:Boolean(t.snakeCase),substituteVariables:Boolean(t.substituteVariables),validator:t.validator}),u.set(e,a)}return a}},function(e,t,n){var i=n(20);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}},function(e,t,n){var i=n(21),r=n(22),a=n(23);e.exports=function(e){return i(e)||r(e)||a()}},function(e,t,n){"use strict";e.exports=function(e,t,n){for(var i=0;i<e.length;i++)if(t.call(n,e[i],i,e))return e[i]}},function(e,t,n){"use strict";var i=n(4),r=i(n(8)),a=i(n(24)),o=n(3),s=n(10),u=n(2),c=n(1),l=n(12).GraphQLRelayDirective,f=n(13).ID,m=n(0),p=m.GraphQLBoolean,d=m.GraphQLEnumType,g=m.GraphQLFloat,h=m.GraphQLID,v=m.GraphQLInputObjectType,y=m.GraphQLInt,b=m.GraphQLInterfaceType,T=m.GraphQLList,N=m.GraphQLNonNull,w=m.GraphQLObjectType,x=m.GraphQLScalarType,E=m.GraphQLString,L=m.GraphQLUnionType,D=m.isAbstractType,A=m.SchemaMetaFieldDef,k=m.TypeMetaFieldDef,F=m.TypeNameMetaFieldDef,S=function(){function e(e,t){this.ast=t,this.context=e}var t=e.prototype;return t.getLocation=function(){return this.ast.loc},t.getType=function(){u(!1)},t.getField=function(e){return s(this.getFields(),function(t){return t.getName()===e})},t.getFields=function(){var e=[];return this.getSelections().forEach(function(t){t instanceof P&&e.push(t)}),e},t.getSelections=function(){var e=this;return this.ast.selectionSet?this.ast.selectionSet.selections.map(function(t){if("Field"===t.kind)return new P(e.context,t,e.getType());if("FragmentSpread"===t.kind)return new j(e.context,t);if("InlineFragment"===t.kind)return new C(e.context,t,e.getType());throw new o(c.format("Unexpected selection kind: %s",t.kind),e.getLocation())}):[]},t.getDirectives=function(){var e=this;return(this.ast.directives||[]).map(function(t){return new M(e.context,t)})},t.hasDirective=function(e){return(this.ast.directives||[]).some(function(t){return t.name.value===e})},t.isPattern=function(){return this.context.isPattern},e}(),R=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getName=function(){return this.ast.name?this.ast.name.value:this.getType().getName({modifiers:!1})},t}(S),V=function(e){function t(t,n,i){var a,o={},u=s(n.directives||[],function(e){return"relay"===e.name.value});u&&(u.arguments||[]).forEach(function(e){o[e.name.value]=e.value});var c=o.pattern&&"BooleanValue"===o.pattern.kind&&o.pattern.value;return(a=e.call(this,(0,r.default)({},t,{isPattern:c}),n)||this).parentType=i,a}return(0,a.default)(t,e),t.prototype.getType=function(){var e=this.ast.typeCondition;if(e){for(;"NamedType"!==e.kind;)e=e.type;return new U(this.context,this.context.schema.getType(e.name.value))}if("InlineFragment"===this.ast.kind){if(!this.parentType)throw new o("Cannot get type of typeless inline fragment without parent type.",this.getLocation());return this.parentType}throw new o(c.format("Unexpected fragment kind: %s",this.ast.kind),this.getLocation())},t}(R),I=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getType=function(){return new U(this.context,this.context.schema.getMutationType())},t}(R),Q=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getType=function(){return new U(this.context,this.context.schema.getQueryType())},t}(R),_=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getType=function(){return new U(this.context,this.context.schema.getSubscriptionType())},t}(R),P=function(e){function t(t,n,i){var r,a=(r=e.call(this,t,n)||this).ast.name.value,s=i.getFieldDefinition(a,n);if(!s)throw new o(c.format("You supplied a field named `%s` on type `%s`, but no such field exists on that type.",a,i.getName({modifiers:!1})),r.getLocation());return r.fieldDef=s,r}(0,a.default)(t,e);var n=t.prototype;return n.getName=function(){return this.ast.name.value},n.getAlias=function(){return this.ast.alias?this.ast.alias.value:null},n.getType=function(){return this.fieldDef.getType()},n.hasArgument=function(e){return this.getArguments().some(function(t){return t.getName()===e})},n.findArgument=function(e){return s(this.getArguments(),function(t){return t.getName()===e})},n.getArguments=function(){var e=this,t=this.fieldDef.getDeclaredArguments();return(this.ast.arguments||[]).map(function(n){var i=n.name.value,r=t[i];if(!r)throw new o(c.format("You supplied an argument named `%s` on field `%s`, but no such argument exists on that field.",i,e.getName()),e.getLocation());return new O(e.context,n,r)})},n.hasDeclaredArgument=function(e){return this.fieldDef.getDeclaredArguments().hasOwnProperty(e)},n.getDeclaredArgument=function(e){return this.fieldDef.getArgument(e)},n.getDeclaredArguments=function(){return this.fieldDef.getDeclaredArguments()},t}(S),j=function(e){function t(){return e.apply(this,arguments)||this}(0,a.default)(t,e);var n=t.prototype;return n.getName=function(){return this.ast.name.value},n.getSelections=function(){throw new o("Cannot get selection of a fragment spread.",this.getLocation())},t}(S),C=function(e){function t(t,n,i){var r;return(r=e.call(this,t,n)||this).parentType=i,r}return(0,a.default)(t,e),t.prototype.getFragment=function(){return new V(this.context,this.ast,this.parentType)},t}(S),M=function(){function e(e,t){var n=this;this.ast=t,this.context=e,this.argTypes={};var i=t.name.value,r=i===l.name?l:e.schema.getDirective(i);if(!r)throw new o(c.format("You supplied a directive named `%s`, but no such directive exists.",i),this.getLocation());r.args.forEach(function(e){n.argTypes[e.name]=new q(e.type)})}var t=e.prototype;return t.getLocation=function(){return this.ast.loc},t.getName=function(){return this.ast.name.value},t.getArguments=function(){var e=this;return(this.ast.arguments||[]).map(function(t){var n=t.name.value,i=e.argTypes[n];if(!i)throw new o(c.format("You supplied an argument named `%s` on directive `%s`, but no such argument exists on that directive.",n,e.getName()),e.getLocation());return new O(e.context,t,i)})},e}(),O=function(){function e(e,t,n){this.ast=t,this.context=e,this.type=n}var t=e.prototype;return t.getLocation=function(){return this.ast.loc},t.getName=function(){return this.ast.name.value},t.getType=function(){return this.type},t.isVariable=function(){return"Variable"===this.ast.value.kind},t.getVariableName=function(){if("Variable"!==this.ast.value.kind)throw new o("Cannot get variable name of an argument value.",this.getLocation());return this.ast.value.name.value},t.getValue=function(){var t=this;if(this.isVariable())throw new o("Cannot get value of an argument variable.",this.getLocation());var n=this.ast.value;return"ListValue"===n.kind?n.values.map(function(n){return new e(t.context,(0,r.default)({},t.ast,{value:n}),t.type.ofType())}):$(n)},e}(),U=function(){function e(e,t){this.context=e;var n=G(t),i=n.isListType,r=n.isNonNullType,a=n.schemaUnmodifiedType;this.isListType=i,this.isNonNullType=r,this.schemaUnmodifiedType=a,this.schemaModifiedType=t}var t=e.prototype;return t.canHaveSubselections=function(){return!(this.schemaUnmodifiedType instanceof x||this.schemaUnmodifiedType instanceof d)},t.getName=function(e){return e.modifiers?this.schemaModifiedType.toString():this.schemaUnmodifiedType.toString()},t.hasField=function(e){return!!this.getFieldDefinition(e)},t.getFieldDefinition=function(e,t){var n,i=this.schemaUnmodifiedType,r=i===this.context.schema.getQueryType(),a=i instanceof w||i instanceof b||i instanceof L,o=i instanceof w||i instanceof b;if(r&&e===A.name?n=A:r&&e===k.name?n=k:a&&e===F.name?n=F:o&&(n=i.getFields()[e]),!n&&D(i)&&t&&t.directives&&t.directives.some(function(e){return"fixme_fat_interface"===e.name.value}))for(var u=this.context.schema.getPossibleTypes(i),c=function(i){var r=u[i].getFields()[e];if(r&&(n=r,t&&t.arguments&&t.arguments.every(function(e){return s(r.args,function(t){return t.name===e.name.value})})))return"break"},l=0;l<u.length;l++){if("break"===c(l))break}return n?new B(this.context,n):null},t.getInterfaces=function(){var t=this;return this.schemaUnmodifiedType instanceof w?this.schemaUnmodifiedType.getInterfaces().map(function(n){return new e(t.context,n)}):[]},t.getConcreteTypes=function(){var t=this;return this.isAbstract()||u(!1),this.context.schema.getPossibleTypes(this.schemaUnmodifiedType).map(function(n){return new e(t.context,n)})},t.getIdentifyingFieldDefinition=function(){return this.alwaysImplements("Node")?this.getFieldDefinition(f):null},t.isAbstract=function(){return D(this.schemaUnmodifiedType)},t.isList=function(){return this.isListType},t.isNonNull=function(){return this.isNonNullType},t.isQueryType=function(){return this.schemaUnmodifiedType===this.context.schema.getQueryType()},t.isConnection=function(){if(!/Connection$/.test(this.getName({modifiers:!1})))return!1;var e=this.getFieldDefinition("edges");if(!e||!e.getType().canHaveSubselections())return!1;var t=e.getType().getFieldDefinition("node");if(!t||!t.getType().canHaveSubselections())return!1;var n=e.getType().getFieldDefinition("cursor");return!(!n||n.getType().canHaveSubselections())},t.isConnectionEdge=function(){return/Edge$/.test(this.getName({modifiers:!1}))&&this.hasField("node")&&this.hasField("cursor")},t.isConnectionPageInfo=function(){return"PageInfo"===this.getName({modifiers:!1})},t.alwaysImplements=function(e){return this.getName({modifiers:!1})===e||this.getInterfaces().some(function(t){return t.getName({modifiers:!1})===e})||this.isAbstract()&&this.getConcreteTypes().every(function(t){return t.alwaysImplements(e)})},t.mayImplement=function(e){return this.getName({modifiers:!1})===e||this.getInterfaces().some(function(t){return t.getName({modifiers:!1})===e})||this.isAbstract()&&this.getConcreteTypes().some(function(t){return t.alwaysImplements(e)})},t.generateField=function(e){var t={kind:"Field",name:{kind:"Name",value:e}};return new P(this.context,t,this)},t.generateIdFragment=function(){return new V(this.context,{kind:"Fragment",name:{kind:"Name",value:"IdFragment"},typeCondition:{kind:"NamedType",name:{value:"Node"}}},this)},e}(),B=function(){function e(e,t){this.context=e,this.schemaFieldDef=t}var t=e.prototype;return t.getName=function(){return this.schemaFieldDef.name},t.getType=function(){return new U(this.context,this.schemaFieldDef.type)},t.hasArgument=function(e){return this.schemaFieldDef.args.some(function(t){return t.name===e})},t.getArgument=function(e){var t=s(this.schemaFieldDef.args,function(t){return t.name===e});return t||u(!1),new q(t.type)},t.getDeclaredArguments=function(){var e={};return this.schemaFieldDef.args.forEach(function(t){e[t.name]=new q(t.type)}),e},e}(),q=function(){function e(e){var t=G(e),n=t.isListType,i=t.isNonNullType,r=t.schemaUnmodifiedType;this.isListType=n,this.isNonNullType=i,this.schemaUnmodifiedArgType=r,this.schemaModifiedArgType=e}var t=e.prototype;return t.getName=function(e){return e.modifiers?this.schemaModifiedArgType.toString():this.schemaUnmodifiedArgType.toString()},t.ofType=function(){return this.isList()||this.isNonNull()||u(!1),new e(this.schemaUnmodifiedArgType)},t.isCustomScalar=function(){return this.isScalar()&&!(this.schemaUnmodifiedArgType===p||this.schemaUnmodifiedArgType===g||this.schemaUnmodifiedArgType===h||this.schemaUnmodifiedArgType===y||this.schemaUnmodifiedArgType===E)},t.isBoolean=function(){return this.schemaUnmodifiedArgType===p},t.isEnum=function(){return this.schemaUnmodifiedArgType instanceof d},t.isID=function(){return this.schemaUnmodifiedArgType===h},t.isList=function(){return this.isListType},t.isNonNull=function(){return this.isNonNullType},t.isNumber=function(){return this.schemaUnmodifiedArgType===g||this.schemaUnmodifiedArgType===y},t.isObject=function(){return this.schemaUnmodifiedArgType instanceof v},t.isScalar=function(){return this.schemaUnmodifiedArgType instanceof x},t.isString=function(){return this.schemaUnmodifiedArgType===E},e}();function G(e){for(var t=!1,n=!1,i=e;;){if(i instanceof T)t=!0;else{if(!(i instanceof N))break;n=!0}i=i.ofType}return{isListType:t,isNonNullType:n,schemaUnmodifiedType:i}}function $(e){switch(e.kind){case"IntValue":return parseInt(e.value,10);case"FloatValue":return parseFloat(e.value);case"StringValue":case"BooleanValue":case"EnumValue":return e.value;case"ListValue":return e.values.map($);case"NullValue":return null;case"ObjectValue":var t={};return e.fields.forEach(function(e){t[e.name.value]=$(e.value)}),t;case"Variable":throw new o(c.format("Unexpected nested variable `%s`; variables are supported as top-level arguments - `node(id: $id)` - or directly within lists - `nodes(ids: [$id])`.",e.name.value),e.loc);default:throw new o(c.format("Unexpected value kind: %s",e.kind),e.loc)}}e.exports={RelayQLArgument:O,RelayQLArgumentType:q,RelayQLDefinition:R,RelayQLDirective:M,RelayQLField:P,RelayQLFieldDefinition:B,RelayQLFragment:V,RelayQLFragmentSpread:j,RelayQLInlineFragment:C,RelayQLMutation:I,RelayQLNode:S,RelayQLQuery:Q,RelayQLSubscription:_,RelayQLType:U}},function(e,t,n){"use strict";var i="directive @relay(\n # Marks a connection field as containing nodes without 'id' fields.\n # This is used to silence the warning when diffing connections.\n isConnectionWithoutNodeID: Boolean,\n\n # Marks a fragment as intended for pattern matching (as opposed to fetching).\n # Used in Classic only.\n pattern: Boolean,\n\n # Marks a fragment as being backed by a GraphQLList.\n plural: Boolean,\n\n # Marks a fragment spread which should be unmasked if provided false\n mask: Boolean = true,\n\n # Selectively pass variables down into a fragment. Only used in Classic.\n variables: [String!],\n) on FRAGMENT_DEFINITION | FRAGMENT_SPREAD | INLINE_FRAGMENT | FIELD",r=(0,n(0).buildSchema)(i+"\ntype Query { x: String }").getDirective("relay");if(!r)throw new Error("Failed to create GraphQLRelayDirective.");e.exports={SCHEMA_EXTENSION:i,GraphQLRelayDirective:r}},function(e,t,n){"use strict";e.exports={ID:"id"}},function(e,t,n){"use strict";var i=n(15),r=n(6),a=n(31),o=n(32),s=n(33),u=n(2);e.exports=function(e){var t=e.types;if(!t)throw new Error('BabelPluginRelay: Expected plugin context to include "types", but got:'+String(e));var n={TaggedTemplateExpression:function(e,n){var c=o(e);if(c)i(t,e,n,c);else{var l=s(e),f=l[0],m=l[1],p=l[2];if(f&&m){var d=n.opts&&n.opts.schema;d||u(!1);var g=a(e,n);e.replaceWith(r(t,e,d,f,g,p,m,!0,n))}}}};return{visitor:{Program:function(e,t){e.traverse(n,t)}}}}},function(e,t,n){"use strict";var i=n(16),r=n(28),a=n(29);e.exports=function(e,t,n,o){if(1!==o.definitions.length)throw new Error("BabelPluginRelay: Expected exactly one definition per graphql tag.");var s=o.definitions[0];if("FragmentDefinition"!==s.kind&&"OperationDefinition"!==s.kind)throw new Error("BabelPluginRelay: Expected a fragment, mutation, query, or subscription, got `"+s.kind+"`.");return function(e,t,n){for(var i=t.scope;i.parent;)i=i.parent;if(t.scope===i)t.replaceWith(n);else{var r=i.generateDeclaredUidIdentifier("graphql");t.replaceWith(e.logicalExpression("||",r,e.assignmentExpression("=",r,n)))}}(e,t,function(e,t,n,o){var s=Boolean(t.opts&&t.opts.compat),u=Boolean(t.opts&&t.opts.haste),c=t.opts&&t.opts.isDevVariable,l=t.opts&&t.opts.artifactDirectory,f=t.opts&&t.opts.buildCommand||"relay-compiler",m="production"!==(process.env.BABEL_ENV||"production"),p=a(e,o,t,{artifactDirectory:l,buildCommand:f,isDevelopment:m,isHasteMode:u,isDevVariable:c});return s?r(e,p,i(e,n,o,t)):p}(e,n,t,s))}},function(e,t,n){"use strict";var i=n(0),r=n(6),a=n(7),o=n(27),s=n(2);function u(e,t){var n=0,r={},a={},o=null,u={Directive:function(e){switch(e.name.value){case"inline":throw new Error("@inline is only available in pure RelayModern mode.");case"argumentDefinitions":if(o)throw new Error("BabelPluginRelay: Expected only one @argumentDefinitions directive");return o=e.arguments,null;case"connection":return null;default:return e}},FragmentSpread:function(t){var i=t.directives,o=t.name.value,u=null,c=null,l=!0;if(0===i.length)c=o;else{var f=i[0];switch(1!==i.length&&s(!1),f.name.value){case"arguments":case"uncheckedArguments_DEPRECATED":var d={};f.arguments.forEach(function(t){var n=t.value;"Variable"===n.kind&&(a[n.name.value]=null);var i=function(e,t){var n=t.name.value,i=t.value,r=null;switch(i.kind){case"Variable":var a=i.name.value;r=p(e,{kind:e.stringLiteral("CallVariable"),callVariableName:e.stringLiteral(a)});break;default:r=m(e,i)}return{name:n,ast:r}}(e,t);d[i.name]=i.ast}),u=p(e,d),c=o+"_args"+ ++n;break;case"relay":var g=f.arguments;(1!==g.length||"mask"!==g[0].name.value)&&s(!1),c=o,l=!1!==g[0].value.value;break;default:throw new Error("BabelPluginRelay: Unsupported directive `"+f.name.value+"` on fragment spread `..."+o+"`.")}}return c||s(!1),r[c]={name:o,args:u,isMasked:l},Object.assign({},t,{name:{kind:"Name",value:c},directives:[]})},Variable:function(e){return a[e.name.value]=null,e}};return{classicAST:i.visit(t,u),fragments:r,variables:a,argumentDefinitions:o}}var c="RelayQL_GENERATED";function l(e,t,n,i){var r=[e.returnStatement(t)];return n.length>0&&r.unshift(e.variableDeclaration("const",n)),e.functionExpression(null,[e.identifier(c)],e.blockStatement(r))}function f(e,t,n){return p(e,{defaultValue:n,kind:e.stringLiteral("LocalArgument"),name:e.stringLiteral(t)})}function m(e,t){switch(t.kind){case"BooleanValue":return e.booleanLiteral(t.value);case"IntValue":return e.numericLiteral(parseInt(t.value,10));case"FloatValue":return e.numericLiteral(parseFloat(t.value));case"StringValue":case"EnumValue":return e.stringLiteral(t.value);case"ListValue":return e.arrayExpression(t.values.map(function(t){return m(e,t)}));default:throw new Error("BabelPluginRelay: Unsupported literal type `"+t.kind+"`.")}}function p(e,t){return e.objectExpression(Object.keys(t).map(function(n){return e.objectProperty(e.identifier(n),t[n])}))}function d(e){var t=e.opts&&e.opts.schema;return t||s(!1),t}function g(e,t,n,a){var s=d(a),u=o(n.name.value),l=u[0],f=u[1],m=i.print(n),p=e.templateLiteral([e.templateElement({raw:m,cooked:m},!0)],[]);return r(e,t,s,p,l,f,c,!1,a)}function h(e,t,n){return Object.keys(n).map(function(i){var r=n[i],a=o(r.name),u=a[0],l=a[1];if(r.isMasked)return e.variableDeclarator(e.identifier(i),function(e,t,n,i,r){var a=[];i&&a.push(e.stringLiteral(i));r&&a.push(r);var o=function(e,t){var n=e.scope.getBinding(t);if(!n)return!1;if("module"===n.kind)return!1;if(n.path.isVariableDeclarator()&&n.path.get("init").node&&n.path.get("init.callee").isIdentifier({name:"require"}))return!1;return!0}(t,n)?e.logicalExpression("||",e.memberExpression(e.identifier(n),e.identifier("__container__")),e.identifier(n)):e.identifier(n);return e.callExpression(e.memberExpression(o,e.identifier("getFragment")),a)}(e,t,u,l,r.args));t.scope.hasBinding(u)||t.scope.hasBinding(l)||s(!1);var f=t.scope.hasBinding(l)?e.memberExpression(e.identifier(l),e.identifier(l)):e.logicalExpression("||",e.memberExpression(e.memberExpression(e.identifier(u),e.identifier(l)),e.identifier(l)),e.memberExpression(e.identifier(u),e.identifier(l)));return e.variableDeclarator(e.identifier(i),e.memberExpression(e.callExpression(e.memberExpression(e.identifier(c),e.identifier("__getClassicFragment")),[f,e.booleanLiteral(!0)]),e.identifier("node")))})}e.exports=function(e,t,n,i){if("FragmentDefinition"===n.kind)return function(e,t,n,i){var r=u(e,n),a=r.classicAST,o=r.fragments,s=r.variables,c=r.argumentDefinitions,d=h(e,t,o),v=p(e,{kind:e.stringLiteral("FragmentDefinition"),argumentDefinitions:function(e,t,n){var i=[];return Object.keys(n).forEach(function(n){var r=(t||[]).find(function(e){return e.name.value===n});if(r){var a=r.value.fields.find(function(e){return"defaultValue"===e.name.value}),o=a?m(e,a.value):e.nullLiteral();i.push(f(e,n,o))}else i.push(function(e,t){return e.objectExpression([e.objectProperty(e.identifier("kind"),e.stringLiteral("RootArgument")),e.objectProperty(e.identifier("name"),e.stringLiteral(t))])}(e,n))}),e.arrayExpression(i)}(e,c,s),node:g(e,t,a,i)});return l(e,v,d)}(e,t,n,i);if("OperationDefinition"===n.kind)return function(e,t,n,i){var r=n.name;if(!r)throw new Error("GraphQL operations must contain names");var o=u(e,n),s=o.classicAST,c=o.fragments,v=h(e,t,c),y="query"===s.operation?function(e,t,n,i){var r,o=d(i),s=i.file&&i.file.opts||{},u=a(o,i.opts||{},s);switch(n.operation){case"query":var c=u.schema.getQueryType();if(!c)throw new Error("Schema does not contain a root query type.");r=c.name;break;case"mutation":var l=u.schema.getMutationType();if(!l)throw new Error("Schema does not contain a root mutation type.");r=l.name;break;case"subscription":var f=u.schema.getSubscriptionType();if(!f)throw new Error("Schema does not contain a root subscription type.");r=f.name;break;default:throw new Error("BabelPluginRelay: Unexpected operation type: `"+n.operation+"`.")}var m={kind:"FragmentDefinition",loc:n.loc,name:{kind:"Name",value:n.name.value},typeCondition:{kind:"NamedType",name:{kind:"Name",value:r}},directives:n.directives,selectionSet:n.selectionSet};return g(e,t,m,i)}(e,t,s,i):g(e,t,s,i),b=p(e,{kind:e.stringLiteral("OperationDefinition"),argumentDefinitions:function(e,t){return t?e.arrayExpression(t.map(function(t){var n=t.variable.name.value,i=t.defaultValue?m(e,t.defaultValue):e.nullLiteral();return f(e,n,i)})):e.arrayExpression([])}(e,n.variableDefinitions),name:e.stringLiteral(r.value),operation:e.stringLiteral(s.operation),node:y});return l(e,b,v)}(e,t,n,i);throw new Error("BabelPluginRelay: Expected a fragment, mutation, query, or subscription, got `"+n.kind+"`.")}},function(e,t,n){"use strict";var i=n(3),r=n(1);e.exports=function(e){if(e instanceof i)return"Relay Transform Error: ".concat(e.message);var t=e.sourceText,n=e.validationErrors;if(n&&t){var a=t.split("\n");return n.map(function(e){return"GraphQL Validation Error: "+e.message+"\n"+e.locations.map(function(e){var t=a[e.line-1];return t&&[">","> "+t,"> "+" ".repeat(e.column-1)+"^^^"].join("\n")}).filter(Boolean).join("\n")}).join("\n")}return r.format("Relay Transform Error: %s\n\n%s",e.message,e.stack)}},function(e,t,n){"use strict";var i=n(19),r=n(2),a=n(1),o=n(11),s=o.RelayQLFragment,u=o.RelayQLMutation,c=o.RelayQLQuery,l=o.RelayQLSubscription,f=n(0),m=f.formatError,p=f.parse,d=f.Source,g=f.validate,h=f.FieldsOnCorrectTypeRule,v=f.FragmentsOnCompositeTypesRule,y=f.KnownArgumentNamesRule,b=f.KnownTypeNamesRule,T=f.PossibleFragmentSpreadsRule,N=f.ValuesOfCorrectTypeRule,w=f.VariablesInAllowedPositionRule,x=function(){function e(e,t){this.schema=e,this.options=t}var t=e.prototype;return t.transform=function(e,t,n){var r=this.processTemplateLiteral(t,n.documentName),a=r.substitutions,o=r.templateText,s=r.variableNames,u=this.processTemplateText(o,n),c=this.processDocumentText(u,n);return new(i(e,this.options))(n.tagName,s).print(c,a,n.enableValidation)},t.processTemplateLiteral=function(e,t){var n=this,i=[],a={},o=[];return e.quasis.forEach(function(t,s){var u=t.value.cooked;if(i.push(u),!t.tail){var c="RQL_"+s,l=e.expressions[s];o.push({name:c,value:l}),/:\s*$/.test(u)?(n.options.substituteVariables||r(!1),i.push("$"+c),a[c]=void 0):i.push("..."+c)}}),{substitutions:o,templateText:i.join("").trim(),variableNames:a}},t.processTemplateText=function(e,t){var n=t.documentName,i=t.propName,a=/^(fragment|mutation|query|subscription)\s*(\w*)?([\s\S]*)/.exec(e);a||r(!1);var o=a[1],s=a[2]||n,u=a[3];return"fragment"===o&&"on"===s&&(s=n+(i?"_"+E(i):"")+"RelayQL",u="on"+u),o+" "+E(s)+" "+u},t.processDocumentText=function(e,t){var n=t.documentName,i=t.enableValidation,o=p(new d(e,n)),f=i?this.validateDocument(o,n):null;if(f){var m=new Error(a.format("You supplied a GraphQL document named `%s` with validation errors.",n));throw m.validationErrors=f,m.sourceText=e,m}var g=o.definitions[0],h={definitionName:E(n),isPattern:!1,generateID:function(){var e=0;return function(){return(e++).toString(32)}}(),schema:this.schema};if("FragmentDefinition"===g.kind)return new s(h,g);if("OperationDefinition"===g.kind){if("mutation"===g.operation)return new u(h,g);if("query"===g.operation)return new c(h,g);if("subscription"===g.operation)return new l(h,g);r(!1)}else r(!1)},t.validateDocument=function(e,t){1!==e.definitions.length&&r(!1);var n,i=this.options.validator;if(i)n=i().validate(this.schema,e);else{var a=[h,v,y,b,T,N,w];n=g(this.schema,e,a)}return n&&n.length>0?n.map(m):null},e}();function E(e){return e[0].toUpperCase()+e.slice(1)}e.exports=x},function(e,t,n){"use strict";var i=n(4),r=i(n(8)),a=i(n(9)),o=n(3),s=n(10),u=n(1),c=n(11),l=c.RelayQLField,f=c.RelayQLFragment,m=c.RelayQLFragmentSpread,p=c.RelayQLInlineFragment,d=c.RelayQLMutation,g=c.RelayQLQuery,h=c.RelayQLSubscription,v=n(13).ID;e.exports=function(e,t){var n=t.snakeCase?function(e){var t={};return Object.keys(e).forEach(function(e){t[e]=e.replace(/[A-Z]/g,function(e){return"_"+e.toLowerCase()})}),t}:function(e){return e},i=e.arrayExpression([]),c=n({__typename:"__typename",clientMutationId:"clientMutationId",clientSubscriptionId:"clientSubscriptionId",cursor:"cursor",edges:"edges",hasNextPage:"hasNextPage",hasPreviousPage:"hasPreviousPage",node:"node",pageInfo:"pageInfo"}),y=t.inputArgumentName||"input",b=e.nullLiteral(),T=function(){function t(e,t){this.tagName=e,this.variableNames=t}var n=t.prototype;return n.print=function(t,n){var i,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t instanceof g)i=this.printQuery(t,r);else if(t instanceof f)i=this.printFragment(t);else if(t instanceof d)i=this.printMutation(t,r);else{if(!(t instanceof h))throw new o(u.format("Unsupported definition: %s",t),t.getLocation());i=this.printSubscription(t,r)}return e.callExpression(e.functionExpression(null,n.map(function(t){return e.identifier(t.name)}),e.blockStatement([e.returnStatement(i)])),n.map(function(e){return e.value}))},n.printQuery=function(t,n){var i=t.getFields();if(1!==i.length&&n)throw new o(u.format("There are %d fields supplied to the query named `%s`, but queries must have exactly one field.",i.length,t.getName()),t.getLocation());var r=i[0],a=r.getType(),s=r.getArguments(),l={},f=a.getIdentifyingFieldDefinition();f&&(l[f.getName()]=!0),a.isAbstract()&&(l[c.__typename]=!0);var m=this.printSelections(r,l),p={};if(a.isList()&&(p.isPlural=!0),a.isAbstract()&&(p.isAbstract=!0),s.length>1)throw new o(u.format("Invalid root field `%s`; Relay only supports root fields with zero or one argument.",r.getName()),t.getLocation());var d=b;if(1===s.length){var g=s[0],h=g.getName(),v=g.getType().getName({modifiers:!0});p.identifyingArgName=h,p.identifyingArgType=v,d=e.arrayExpression([E({kind:e.valueToNode("Call"),metadata:D({type:v}),name:e.valueToNode(h),value:this.printArgumentValue(g)})])}return E({calls:d,children:m,directives:this.printDirectives(r.getDirectives()),fieldName:e.valueToNode(r.getName()),kind:e.valueToNode("Query"),metadata:D(p),name:e.valueToNode(t.getName()),type:e.valueToNode(a.getName({modifiers:!1}))})},n.printFragment=function(t){var n,i=this,r=t.getType(),a={};r.hasField(v)?a[v]=!0:N(t)&&(n=r.generateIdFragment()),r.isAbstract()&&(a[c.__typename]=!0);var u=this.printSelections(t,a,n?[n]:null,t.hasDirective("generated")),l=F(t),f=l&&s(l.getArguments(),function(e){return"variables"===e.getName()}),m=this.printRelayDirectiveMetadata(t,{isAbstract:r.isAbstract(),isTrackingEnabled:!!f}),p=E({children:u,directives:this.printDirectives(t.getDirectives()),id:this.printFragmentID(t),kind:e.valueToNode("Fragment"),metadata:m,name:e.valueToNode(t.getName()),type:e.valueToNode(r.getName({modifiers:!1}))});if(f){var d=f.getValue();if(!Array.isArray(d))throw new o("The variables argument to the @relay directive should be an array of strings.",t.getLocation());return e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__createFragment")),[p,e.objectExpression(d.map(function(e){var t=e.getValue();return A(t,i.printVariable(t))}))])}return p},n.printFragmentID=function(t){return e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__id")),[])},n.printMutation=function(t,n){var i=t.getFields();if(1!==i.length&&n)throw new o(u.format("There are %d fields supplied to the mutation named `%s`, but mutations must have exactly one field.",i.length,t.getName()),t.getLocation());var r=i[0],a=r.getType();w(r);var s={};a.hasField(c.clientMutationId)&&(s[c.clientMutationId]=!0);var l=this.printSelections(r,s),f={inputType:this.printArgumentTypeForMetadata(r.getDeclaredArgument(y))};return E({calls:e.arrayExpression([E({kind:e.valueToNode("Call"),metadata:D({}),name:e.valueToNode(r.getName()),value:this.printVariable("input")})]),children:l,directives:this.printDirectives(t.getDirectives()),kind:e.valueToNode("Mutation"),metadata:D(f),name:e.valueToNode(t.getName()),responseType:e.valueToNode(a.getName({modifiers:!1}))})},n.printSubscription=function(t,n){var i=t.getFields();if(1!==i.length&&n)throw new o(u.format("There are %d fields supplied to the subscription named `%s`, but subscriptions must have exactly one field.",i.length,t.getName()),t.getLocation());var r=i[0],a=r.getType();w(r);var s={};a.hasField(c.clientSubscriptionId)&&(s[c.clientSubscriptionId]=!0),a.hasField(c.clientMutationId)&&(s[c.clientMutationId]=!0);var l=this.printSelections(r,s),f={inputType:this.printArgumentTypeForMetadata(r.getDeclaredArgument(y))};return E({calls:e.arrayExpression([E({kind:e.valueToNode("Call"),metadata:D({}),name:e.valueToNode(r.getName()),value:this.printVariable("input")})]),children:l,directives:this.printDirectives(t.getDirectives()),kind:e.valueToNode("Subscription"),metadata:D(f),name:e.valueToNode(t.getName()),responseType:e.valueToNode(a.getName({modifiers:!1}))})},n.printSelections=function(t,n,r){var s=this,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3],f=[],d=[],g=!1;t.getSelections().forEach(function(e){if(e instanceof m){if(0!==e.getDirectives().length)throw new o("Directives are not yet supported for `${fragment}`-style fragment references.",e.getLocation());d.push(s.printFragmentReference(e)),g=!0}else if(e instanceof p)d.push(s.printFragment(e.getFragment()));else{if(!(e instanceof l))throw new o(u.format("Unsupported selection type `%s`.",e),e.getLocation());f.push(e)}}),r&&r.forEach(function(e){d.push(s.printFragment(e))});var h=this.printFields(f,t,n,c),v=(0,a.default)(h).concat(d);if(v.length){var y=e.arrayExpression(v);return g?function(t){return e.callExpression(e.memberExpression(e.memberExpression(i,e.identifier("concat")),e.identifier("apply")),[i,t])}(y):y}return b},n.printFields=function(e,t,n){var i=this,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=t.getType();o.isConnection()&&o.hasField(c.pageInfo)&&e.some(function(e){return e.getName()===c.edges})&&(n[c.pageInfo]=!0);var s=(0,r.default)({},n),u=[];return e.forEach(function(e){delete s[e.getName()],u.push(i.printField(e,t,n,s,a))}),Object.keys(s).forEach(function(e){var r=o.generateField(e);u.push(i.printField(r,t,n,s,a))}),u},n.printField=function(t,n,i,r){var a,s=this,l=arguments.length>4&&void 0!==arguments[4]&&arguments[4],f=t.getType(),m={},p={};f.hasField(v)?p[v]=!0:N(t)&&(a=f.generateIdFragment()),l||function(e,t){if("node"===e.getName()){var n=e.getDeclaredArguments(),i=Object.keys(n);if(!t.isQueryType()&&1===i.length&&i[0]===v)throw new o(u.format("You defined a `node(%s: %s)` field on type `%s`, but Relay requires the `node` field to be defined on the root type. See the Object Identification Guide: \nhttps://facebook.github.io/relay/docs/en/graphql-server-specification.html#object-identification",v,i[0]&&n[i[0]].getName({modifiers:!0}),t.getName({modifiers:!1})),e.getLocation())}}(t,n.getType()),f.canHaveSubselections()&&(m.canHaveSubselections=!0),f.alwaysImplements("Node")&&(m.inferredRootCallName="node",m.inferredPrimaryKey=v),f.isConnection()?(t.hasDeclaredArgument("first")||t.hasDeclaredArgument("last"))&&(l||function(e){var t=[e.findArgument("first"),e.findArgument("last"),e.findArgument("before"),e.findArgument("after")],n=t[0],i=t[1],r=t[2],a=t[3],s=!n||!i||n.isVariable()&&i.isVariable();if(!s)throw new o(u.format("Connection arguments `%s(first: <count>, last: <count>)` are not supported unless both are variables. Use `(first: <count>)`, `(last: <count>)`, or `(first: $<var>, last: $<var>)`.",e.getName()),e.getLocation());if(!(s=!n||!r||n.isVariable()&&r.isVariable()))throw new o(u.format("Connection arguments `%s(before: <cursor>, first: <count>)` are not supported unless both are variables. Use `(first: <count>)`, `(after: <cursor>, first: <count>)`, `(before: <cursor>, last: <count>)`, or `(before: $<var>, first: $<var>)`.",e.getName()),e.getLocation());if(!(s=!i||!a||i.isVariable()&&a.isVariable()))throw new o(u.format("Connection arguments `%s(after: <cursor>, last: <count>)` are not supported unless both are variables. Use `(last: <count>)`, `(before: <cursor>, last: <count>)`, `(after: <cursor>, first: <count>)`, or `(after: $<var>, last: $<var>)`.",e.getName()),e.getLocation());var l=e.getType().getFieldDefinition(c.edges).getType().getFieldDefinition(c.node).getType();x(e,function(t){if(t.getName()===c.edges||t.getName()===c.pageInfo){var n=e.isPattern()||e.hasArgument("find")||e.hasArgument("first")||e.hasArgument("last");if(!n)throw new o(u.format("You supplied the `%s` field on a connection named `%s`, but you did not supply an argument necessary for Relay to handle the connection. Please specify a limit argument like `first`, or `last` or fetch a specific item with a `find` argument.",t.getName(),e.getName()),e.getLocation())}else{var i=t.getType(),r=i.isList()&&i.getName({modifiers:!1})===l.getName({modifiers:!1});if(r)throw new o(u.format("You supplied a field named `%s` on a connection named `%s`, but pagination is not supported on connections without using `%s`. Use `%s{%s{%s{...}}}` instead.",t.getName(),e.getName(),c.edges,e.getName(),c.edges,c.node),e.getLocation())}})}(t),m.isConnection=!0,t.hasDeclaredArgument("find")&&(m.isFindable=!0)):f.isConnectionPageInfo()?(p[c.hasNextPage]=!0,p[c.hasPreviousPage]=!0):f.isConnectionEdge()&&(p[c.cursor]=!0,p[c.node]=!0),f.isAbstract()&&(m.isAbstract=!0,p[c.__typename]=!0),f.isList()&&(m.isPlural=!0),r.hasOwnProperty(t.getName())&&(m.isGenerated=!0),i.hasOwnProperty(t.getName())&&(m.isRequisite=!0);var d=this.printSelections(t,p,a?[a]:null,l),g=t.getAlias(),h=t.getArguments(),y=h.length?e.arrayExpression(h.map(function(e){return s.printArgument(e)})):b;return E({alias:g?e.valueToNode(g):b,calls:y,children:d,directives:this.printDirectives(t.getDirectives()),fieldName:e.valueToNode(t.getName()),kind:e.valueToNode("Field"),metadata:this.printRelayDirectiveMetadata(t,m),type:e.valueToNode(f.getName({modifiers:!1}))})},n.printFragmentReference=function(t){return e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__frag")),[e.identifier(t.getName())])},n.printArgument=function(t){var n={},i=this.printArgumentTypeForMetadata(t.getType());return i&&(n.type=i),E({kind:e.valueToNode("Call"),metadata:D(n),name:e.valueToNode(t.getName()),value:this.printArgumentValue(t)})},n.printArgumentValue=function(e){return e.isVariable()?this.printVariable(e.getVariableName()):this.printValue(e.getValue())},n.printVariable=function(t){return this.variableNames.hasOwnProperty(t)?e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__var")),[e.identifier(t)]):E({kind:e.valueToNode("CallVariable"),callVariableName:e.valueToNode(t)})},n.printValue=function(t){var n=this;return Array.isArray(t)?e.arrayExpression(t.map(function(e){return n.printArgumentValue(e)})):E({kind:e.valueToNode("CallValue"),callValue:null==t?e.nullLiteral():k(t)})},n.printDirectives=function(t){var n=this,i=[];return t.forEach(function(t){"relay"!==t.getName()&&i.push(e.objectExpression([A("kind",e.valueToNode("Directive")),A("name",e.valueToNode(t.getName())),A("args",e.arrayExpression(t.getArguments().map(function(t){return e.objectExpression([A("name",e.valueToNode(t.getName())),A("value",n.printArgumentValue(t))])})))]))}),i.length?e.arrayExpression(i):b},n.printRelayDirectiveMetadata=function(t,n){var i=[],r=F(t);if(r&&r.getArguments().forEach(function(n){if(n.isVariable())throw new o(u.format("You supplied `$%s` as the `%s` argument to the `@relay` directive, but `@relay` require scalar argument values.",n.getVariableName(),n.getName()),t.getLocation());"variables"!==n.getName()&&i.push(A(n.getName(),e.valueToNode(n.getValue())))}),n){var a=n;Object.keys(a).forEach(function(t){a[t]&&i.push(A(t,e.valueToNode(a[t])))})}return e.objectExpression(i)},n.printArgumentTypeForMetadata=function(e){return e.isBoolean()||e.isID()||e.isString()?null:e.getName({modifiers:!0})},t}();function N(e){return e.getType().mayImplement("Node")&&!e.getSelections().some(function(e){return e instanceof p&&"Node"===e.getFragment().getType().getName({modifiers:!1})})}function w(e){var t=e.getDeclaredArguments(),n=Object.keys(t);if(1!==n.length)throw new o(u.format("Your schema defines a mutation field `%s` that takes %d arguments, but mutation fields must have exactly one argument named `%s`.",e.getName(),n.length,y),e.getLocation());if(n[0]!==y)throw new o(u.format("Your schema defines a mutation field `%s` that takes an argument named `%s`, but mutation fields must have exactly one argument named `%s`.",e.getName(),n[0],y),e.getLocation());var i=e.getArguments();if(i.length>1)throw new o(u.format("There are %d arguments supplied to the mutation field named `%s`, but mutation fields must have exactly one `%s` argument.",i.length,e.getName(),y),e.getLocation())}var x=function e(t,n){t.getSelections().forEach(function(t){t instanceof l?n(t):t instanceof p&&e(t.getFragment(),n)})};function E(t){var n=[];return Object.keys(t).forEach(function(e){var i=t[e];i!==b&&n.push(A(e,i))}),e.objectExpression(n)}function L(t){return t.split(".").reduce(function(t,n){return t?e.memberExpression(t,e.identifier(n)):e.identifier(n)},null)}function D(t){var n=[];return Object.keys(t).forEach(function(i){var r=t[i];r&&n.push(A(i,e.valueToNode(r)))}),e.objectExpression(n)}function A(t,n){return e.objectProperty(e.identifier(t),n)}function k(t){if(null==t)return b;if(Array.isArray(t))return e.arrayExpression(t.map(k));if("object"==typeof t&&null!=t){var n=t;return e.objectExpression(Object.keys(n).map(function(e){return A(e,k(n[e]))}))}return e.valueToNode(t)}function F(e){return s(e.getDirectives(),function(e){return"relay"===e.getName()})}return T}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";var i=n(26),r=n(5),a=n(12).SCHEMA_EXTENSION,o=n(0).parse;function s(e,t){var n=!i.existsSync(e)&&t?r.join(t,e):e;return i.readFileSync(n,"utf8")}e.exports=function(e,t){try{var n=e.split(",");if(n.length>1)return o(a+"\n"+n.map(function(e){return s(e,t)}).join("\n"));var i=s(e,t);return"{"===i[0]?JSON.parse(i):o(a+"\n"+i)}catch(t){throw console.error("Encountered the following error while loading the GraphQL schema: "+e+"\n\n"+t.stack.split("\n").map(function(e){return"> "+e}).join("\n")),t}}},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";var i="data";e.exports=function(e){var t=e.match(/^([a-zA-Z][a-zA-Z0-9]*)(?:_([a-zA-Z][_a-zA-Z0-9]*))?$/);if(!t)throw new Error("BabelPluginGraphQL: Fragments should be named `ModuleName_fragmentName`, got `"+e+"`.");var n=t[1],r=t[2];if(r===i)throw new Error("BabelPluginGraphQL: Fragment `"+e+"` should not end in `_data` to avoid conflict with a fragment named `"+n+"` which also provides resulting data via the React prop `data`. Either rename this fragment to `"+n+"` or choose a different prop name.");return[n,r||i]}},function(e,t,n){"use strict";e.exports=function(e,t,n){return e.objectExpression([e.objectProperty(e.identifier("modern"),t),e.objectProperty(e.identifier("classic"),n)])}},function(e,t,n){"use strict";var i=n(4)(n(9)),r=n(30),a=n(2),o=n(5),s=n(0).print,u="./__generated__/";e.exports=function(e,t,n,c){var l=t.name&&t.name.value;if(!l)throw new Error("GraphQL operations and fragments must contain names");var f=l+".graphql",m=c.isHasteMode?f:c.artifactDirectory?function(e,t,n){null==e.file&&a(!1);var i=e.file.opts.filename,r=o.relative(o.dirname(i),o.resolve(t));return(0!==r.length&&r.startsWith(".")?"":"./")+o.join(r,n)}(n,c.artifactDirectory,f):u+f,p=r.createHash("md5").update(s(t),"utf8").digest("hex"),d=e.callExpression(e.identifier("require"),[e.stringLiteral(m)]),g=[e.returnStatement(d)];if(null!=c.isDevVariable||c.isDevelopment){var h=e.identifier("node"),v=e.memberExpression(h,e.identifier("hash")),y=[e.variableDeclaration("const",[e.variableDeclarator(h,d)]),e.ifStatement(e.logicalExpression("&&",v,e.binaryExpression("!==",v,e.stringLiteral(p))),e.blockStatement([e.expressionStatement(function(e,t,n){return e.callExpression(e.memberExpression(e.identifier("console"),e.identifier("error")),[e.stringLiteral("The definition of '".concat(t,"' appears to have changed. Run ")+"`"+n+"` to update the generated files to receive the expected data.")])}(e,l,c.buildCommand))]))];null!=c.isDevVariable&&(y=[e.ifStatement(e.identifier(c.isDevVariable),e.blockStatement(y))]),g.unshift.apply(g,(0,i.default)(y))}return e.functionExpression(null,[],e.blockStatement(g))}},function(e,t){e.exports=require("crypto")},function(e,t,n){"use strict";var i=n(5).basename,r="providesModule";e.exports=function(e,t){for(var n=e;n.parentPath;)n=n.parentPath;var a=n.documentName;if(!a){var o=n.parent;if(o.comments&&o.comments.length)for(var s,u=o.comments[0].value||"",c=/@(\S+) *(\S*)/g;s=c.exec(u);){var l=s[1],f=s[2];if(l===r){a=f.replace(/[\.-:]/g,"_");break}}var m=t.file&&t.file.opts&&t.file.opts.filename&&i(t.file.opts.filename);if(m&&!a){var p=m.match(/^[_A-Za-z][_0-9A-Za-z]*/);p&&(a=p[0])}a=a||"UnknownFile",n.documentName=a}return a}},function(e,t,n){"use strict";var i=n(0);e.exports=function(e){if(!e.get("tag").isIdentifier({name:"graphql"}))return null;var t=e.node.quasi.quasis;if(1!==t.length)throw new Error("BabelPluginRelay: Substitutions are not allowed in graphql fragments. Included fragments should be referenced as `...MyModule_propName`.");var n=t[0].value.raw,r=i.parse(n);if(0===r.definitions.length)throw new Error("BabelPluginRelay: Unexpected empty graphql tag.");return r}},function(e,t,n){"use strict";e.exports=function(e){var t=e.node,n=e.get("tag"),i=n.matchesPattern("Relay.QL")?"Relay.QL":n.matchesPattern("RelayClassic_DEPRECATED.QL")?"RelayClassic_DEPRECATED.QL":n.matchesPattern("RelayClassic.QL")?"RelayClassic.QL":n.isIdentifier({name:"RelayQL"})?"RelayQL":null;if(!i)return[null,null,null];for(var r=e,a=null;!a&&(r=r.parentPath);)r.isProperty()&&(a=r.node.key.name);return[t.quasi,i,a]}}]);
9
+ module.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}([function(e,t){e.exports=require("graphql")},function(e,t){e.exports=require("util")},function(e,t,n){"use strict";var i=n(1);e.exports=function(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];throw new Error(i.format.apply(i,[t].concat(r)))}}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var i=n(15);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}},function(e,t,n){"use strict";e.exports=function(e,t){this.message=e,this.loc=t,this.stack=(new Error).stack}},function(e,t){e.exports=require("path")},function(e,t,n){"use strict";var i=n(18),r=n(8);e.exports=function(e,t,n,a,o,s,u,l,c){try{var f=c.file&&c.file.opts||{};return r(n,c.opts||{},f).transform(e,a,{documentName:o,propName:s,tagName:u,enableValidation:l})}catch(e){throw t.buildCodeFrameError(i(e),Error)}}},function(e,t,n){"use strict";var i=n(19),r=n(25),a=n(0),o=a.buildASTSchema,s=a.buildClientSchema,u=new Map;e.exports=function(e,t,n){var a=u.get(e);if(!a){var l=function(e,t){var n="function"==typeof e?e():e,i="string"==typeof n?r(n,t.sourceRoot):n;if(i.__schema)return s(i);if(i.data&&i.data.__schema)return s(i.data);if(i.kind&&"Document"===i.kind)return o(i,{assumeValid:!0});throw new Error("Invalid introspection data supplied to babel-plugin-relay. The resulting schema is not an object with a `__schema` property or a schema IDL language.")}(e,n);a=new i(l,{inputArgumentName:t.inputArgumentName,snakeCase:Boolean(t.snakeCase),substituteVariables:Boolean(t.substituteVariables),validator:t.validator}),u.set(e,a)}return a}},function(e,t,n){var i=n(21),r=n(22),a=n(23);e.exports=function(e){return i(e)||r(e)||a()}},function(e,t,n){"use strict";e.exports=function(e,t,n){for(var i=0;i<e.length;i++)if(t.call(n,e[i],i,e))return e[i]}},function(e,t,n){"use strict";var i=n(3),r=i(n(4)),a=i(n(24)),o=n(5),s=n(10),u=n(2),l=n(1),c=n(12).GraphQLRelayDirective,f=n(13).ID,p=n(0),m=p.GraphQLBoolean,d=p.GraphQLEnumType,g=p.GraphQLFloat,h=p.GraphQLID,v=p.GraphQLInputObjectType,y=p.GraphQLInt,b=p.GraphQLInterfaceType,T=p.GraphQLList,N=p.GraphQLNonNull,w=p.GraphQLObjectType,x=p.GraphQLScalarType,E=p.GraphQLString,L=p.GraphQLUnionType,D=p.isAbstractType,A=p.SchemaMetaFieldDef,k=p.TypeMetaFieldDef,_=p.TypeNameMetaFieldDef,F=function(){function e(e,t){this.ast=t,this.context=e}var t=e.prototype;return t.getLocation=function(){return this.ast.loc},t.getType=function(){u(!1)},t.getField=function(e){return s(this.getFields(),function(t){return t.getName()===e})},t.getFields=function(){var e=[];return this.getSelections().forEach(function(t){t instanceof P&&e.push(t)}),e},t.getSelections=function(){var e=this;return this.ast.selectionSet?this.ast.selectionSet.selections.map(function(t){if("Field"===t.kind)return new P(e.context,t,e.getType());if("FragmentSpread"===t.kind)return new j(e.context,t);if("InlineFragment"===t.kind)return new C(e.context,t,e.getType());throw new o(l.format("Unexpected selection kind: %s",t.kind),e.getLocation())}):[]},t.getDirectives=function(){var e=this;return(this.ast.directives||[]).map(function(t){return new M(e.context,t)})},t.hasDirective=function(e){return(this.ast.directives||[]).some(function(t){return t.name.value===e})},t.isPattern=function(){return this.context.isPattern},e}(),S=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getName=function(){return this.ast.name?this.ast.name.value:this.getType().getName({modifiers:!1})},t}(F),R=function(e){function t(t,n,i){var a,o={},u=s(n.directives||[],function(e){return"relay"===e.name.value});u&&(u.arguments||[]).forEach(function(e){o[e.name.value]=e.value});var l=o.pattern&&"BooleanValue"===o.pattern.kind&&o.pattern.value;return(a=e.call(this,(0,r.default)({},t,{isPattern:l}),n)||this).parentType=i,a}return(0,a.default)(t,e),t.prototype.getType=function(){var e=this.ast.typeCondition;if(e){for(;"NamedType"!==e.kind;)e=e.type;return new U(this.context,this.context.schema.getType(e.name.value))}if("InlineFragment"===this.ast.kind){if(!this.parentType)throw new o("Cannot get type of typeless inline fragment without parent type.",this.getLocation());return this.parentType}throw new o(l.format("Unexpected fragment kind: %s",this.ast.kind),this.getLocation())},t}(S),V=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getType=function(){return new U(this.context,this.context.schema.getMutationType())},t}(S),Q=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getType=function(){return new U(this.context,this.context.schema.getQueryType())},t}(S),I=function(e){function t(){return e.apply(this,arguments)||this}return(0,a.default)(t,e),t.prototype.getType=function(){return new U(this.context,this.context.schema.getSubscriptionType())},t}(S),P=function(e){function t(t,n,i){var r,a=(r=e.call(this,t,n)||this).ast.name.value,s=i.getFieldDefinition(a,n);if(!s)throw new o(l.format("You supplied a field named `%s` on type `%s`, but no such field exists on that type.",a,i.getName({modifiers:!1})),r.getLocation());return r.fieldDef=s,r}(0,a.default)(t,e);var n=t.prototype;return n.getName=function(){return this.ast.name.value},n.getAlias=function(){return this.ast.alias?this.ast.alias.value:null},n.getType=function(){return this.fieldDef.getType()},n.hasArgument=function(e){return this.getArguments().some(function(t){return t.getName()===e})},n.findArgument=function(e){return s(this.getArguments(),function(t){return t.getName()===e})},n.getArguments=function(){var e=this,t=this.fieldDef.getDeclaredArguments();return(this.ast.arguments||[]).map(function(n){var i=n.name.value,r=t[i];if(!r)throw new o(l.format("You supplied an argument named `%s` on field `%s`, but no such argument exists on that field.",i,e.getName()),e.getLocation());return new O(e.context,n,r)})},n.hasDeclaredArgument=function(e){return this.fieldDef.getDeclaredArguments().hasOwnProperty(e)},n.getDeclaredArgument=function(e){return this.fieldDef.getArgument(e)},n.getDeclaredArguments=function(){return this.fieldDef.getDeclaredArguments()},t}(F),j=function(e){function t(){return e.apply(this,arguments)||this}(0,a.default)(t,e);var n=t.prototype;return n.getName=function(){return this.ast.name.value},n.getSelections=function(){throw new o("Cannot get selection of a fragment spread.",this.getLocation())},t}(F),C=function(e){function t(t,n,i){var r;return(r=e.call(this,t,n)||this).parentType=i,r}return(0,a.default)(t,e),t.prototype.getFragment=function(){return new R(this.context,this.ast,this.parentType)},t}(F),M=function(){function e(e,t){var n=this;this.ast=t,this.context=e,this.argTypes={};var i=t.name.value,r=i===c.name?c:e.schema.getDirective(i);if(!r)throw new o(l.format("You supplied a directive named `%s`, but no such directive exists.",i),this.getLocation());r.args.forEach(function(e){n.argTypes[e.name]=new G(e.type)})}var t=e.prototype;return t.getLocation=function(){return this.ast.loc},t.getName=function(){return this.ast.name.value},t.getArguments=function(){var e=this;return(this.ast.arguments||[]).map(function(t){var n=t.name.value,i=e.argTypes[n];if(!i)throw new o(l.format("You supplied an argument named `%s` on directive `%s`, but no such argument exists on that directive.",n,e.getName()),e.getLocation());return new O(e.context,t,i)})},e}(),O=function(){function e(e,t,n){this.ast=t,this.context=e,this.type=n}var t=e.prototype;return t.getLocation=function(){return this.ast.loc},t.getName=function(){return this.ast.name.value},t.getType=function(){return this.type},t.isVariable=function(){return"Variable"===this.ast.value.kind},t.getVariableName=function(){if("Variable"!==this.ast.value.kind)throw new o("Cannot get variable name of an argument value.",this.getLocation());return this.ast.value.name.value},t.getValue=function(){var t=this;if(this.isVariable())throw new o("Cannot get value of an argument variable.",this.getLocation());var n=this.ast.value;return"ListValue"===n.kind?n.values.map(function(n){return new e(t.context,(0,r.default)({},t.ast,{value:n}),t.type.ofType())}):$(n)},e}(),U=function(){function e(e,t){this.context=e;var n=B(t),i=n.isListType,r=n.isNonNullType,a=n.schemaUnmodifiedType;this.isListType=i,this.isNonNullType=r,this.schemaUnmodifiedType=a,this.schemaModifiedType=t}var t=e.prototype;return t.canHaveSubselections=function(){return!(this.schemaUnmodifiedType instanceof x||this.schemaUnmodifiedType instanceof d)},t.getName=function(e){return e.modifiers?this.schemaModifiedType.toString():this.schemaUnmodifiedType.toString()},t.hasField=function(e){return!!this.getFieldDefinition(e)},t.getFieldDefinition=function(e,t){var n,i=this.schemaUnmodifiedType,r=i===this.context.schema.getQueryType(),a=i instanceof w||i instanceof b||i instanceof L,o=i instanceof w||i instanceof b;if(r&&e===A.name?n=A:r&&e===k.name?n=k:a&&e===_.name?n=_:o&&(n=i.getFields()[e]),!n&&D(i)&&t&&t.directives&&t.directives.some(function(e){return"fixme_fat_interface"===e.name.value}))for(var u=this.context.schema.getPossibleTypes(i),l=function(i){var r=u[i].getFields()[e];if(r&&(n=r,t&&t.arguments&&t.arguments.every(function(e){return s(r.args,function(t){return t.name===e.name.value})})))return"break"},c=0;c<u.length;c++){if("break"===l(c))break}return n?new q(this.context,n):null},t.getInterfaces=function(){var t=this;return this.schemaUnmodifiedType instanceof w?this.schemaUnmodifiedType.getInterfaces().map(function(n){return new e(t.context,n)}):[]},t.getConcreteTypes=function(){var t=this;return this.isAbstract()||u(!1),this.context.schema.getPossibleTypes(this.schemaUnmodifiedType).map(function(n){return new e(t.context,n)})},t.getIdentifyingFieldDefinition=function(){return this.alwaysImplements("Node")?this.getFieldDefinition(f):null},t.isAbstract=function(){return D(this.schemaUnmodifiedType)},t.isList=function(){return this.isListType},t.isNonNull=function(){return this.isNonNullType},t.isQueryType=function(){return this.schemaUnmodifiedType===this.context.schema.getQueryType()},t.isConnection=function(){if(!/Connection$/.test(this.getName({modifiers:!1})))return!1;var e=this.getFieldDefinition("edges");if(!e||!e.getType().canHaveSubselections())return!1;var t=e.getType().getFieldDefinition("node");if(!t||!t.getType().canHaveSubselections())return!1;var n=e.getType().getFieldDefinition("cursor");return!(!n||n.getType().canHaveSubselections())},t.isConnectionEdge=function(){return/Edge$/.test(this.getName({modifiers:!1}))&&this.hasField("node")&&this.hasField("cursor")},t.isConnectionPageInfo=function(){return"PageInfo"===this.getName({modifiers:!1})},t.alwaysImplements=function(e){return this.getName({modifiers:!1})===e||this.getInterfaces().some(function(t){return t.getName({modifiers:!1})===e})||this.isAbstract()&&this.getConcreteTypes().every(function(t){return t.alwaysImplements(e)})},t.mayImplement=function(e){return this.getName({modifiers:!1})===e||this.getInterfaces().some(function(t){return t.getName({modifiers:!1})===e})||this.isAbstract()&&this.getConcreteTypes().some(function(t){return t.alwaysImplements(e)})},t.generateField=function(e){var t={kind:"Field",name:{kind:"Name",value:e}};return new P(this.context,t,this)},t.generateIdFragment=function(){return new R(this.context,{kind:"Fragment",name:{kind:"Name",value:"IdFragment"},typeCondition:{kind:"NamedType",name:{value:"Node"}}},this)},e}(),q=function(){function e(e,t){this.context=e,this.schemaFieldDef=t}var t=e.prototype;return t.getName=function(){return this.schemaFieldDef.name},t.getType=function(){return new U(this.context,this.schemaFieldDef.type)},t.hasArgument=function(e){return this.schemaFieldDef.args.some(function(t){return t.name===e})},t.getArgument=function(e){var t=s(this.schemaFieldDef.args,function(t){return t.name===e});return t||u(!1),new G(t.type)},t.getDeclaredArguments=function(){var e={};return this.schemaFieldDef.args.forEach(function(t){e[t.name]=new G(t.type)}),e},e}(),G=function(){function e(e){var t=B(e),n=t.isListType,i=t.isNonNullType,r=t.schemaUnmodifiedType;this.isListType=n,this.isNonNullType=i,this.schemaUnmodifiedArgType=r,this.schemaModifiedArgType=e}var t=e.prototype;return t.getName=function(e){return e.modifiers?this.schemaModifiedArgType.toString():this.schemaUnmodifiedArgType.toString()},t.ofType=function(){return this.isList()||this.isNonNull()||u(!1),new e(this.schemaUnmodifiedArgType)},t.isCustomScalar=function(){return this.isScalar()&&!(this.schemaUnmodifiedArgType===m||this.schemaUnmodifiedArgType===g||this.schemaUnmodifiedArgType===h||this.schemaUnmodifiedArgType===y||this.schemaUnmodifiedArgType===E)},t.isBoolean=function(){return this.schemaUnmodifiedArgType===m},t.isEnum=function(){return this.schemaUnmodifiedArgType instanceof d},t.isID=function(){return this.schemaUnmodifiedArgType===h},t.isList=function(){return this.isListType},t.isNonNull=function(){return this.isNonNullType},t.isNumber=function(){return this.schemaUnmodifiedArgType===g||this.schemaUnmodifiedArgType===y},t.isObject=function(){return this.schemaUnmodifiedArgType instanceof v},t.isScalar=function(){return this.schemaUnmodifiedArgType instanceof x},t.isString=function(){return this.schemaUnmodifiedArgType===E},e}();function B(e){for(var t=!1,n=!1,i=e;;){if(i instanceof T)t=!0;else{if(!(i instanceof N))break;n=!0}i=i.ofType}return{isListType:t,isNonNullType:n,schemaUnmodifiedType:i}}function $(e){switch(e.kind){case"IntValue":return parseInt(e.value,10);case"FloatValue":return parseFloat(e.value);case"StringValue":case"BooleanValue":case"EnumValue":return e.value;case"ListValue":return e.values.map($);case"NullValue":return null;case"ObjectValue":var t={};return e.fields.forEach(function(e){t[e.name.value]=$(e.value)}),t;case"Variable":throw new o(l.format("Unexpected nested variable `%s`; variables are supported as top-level arguments - `node(id: $id)` - or directly within lists - `nodes(ids: [$id])`.",e.name.value),e.loc);default:throw new o(l.format("Unexpected value kind: %s",e.kind),e.loc)}}e.exports={RelayQLArgument:O,RelayQLArgumentType:G,RelayQLDefinition:S,RelayQLDirective:M,RelayQLField:P,RelayQLFieldDefinition:q,RelayQLFragment:R,RelayQLFragmentSpread:j,RelayQLInlineFragment:C,RelayQLMutation:V,RelayQLNode:F,RelayQLQuery:Q,RelayQLSubscription:I,RelayQLType:U}},function(e,t,n){"use strict";var i="directive @relay(\n # Marks a connection field as containing nodes without 'id' fields.\n # This is used to silence the warning when diffing connections.\n isConnectionWithoutNodeID: Boolean,\n\n # Marks a fragment as intended for pattern matching (as opposed to fetching).\n # Used in Classic only.\n pattern: Boolean,\n\n # Marks a fragment as being backed by a GraphQLList.\n plural: Boolean,\n\n # Marks a fragment spread which should be unmasked if provided false\n mask: Boolean = true,\n\n # Selectively pass variables down into a fragment. Only used in Classic.\n variables: [String!],\n) on FRAGMENT_DEFINITION | FRAGMENT_SPREAD | INLINE_FRAGMENT | FIELD",r=(0,n(0).buildSchema)(i+"\ntype Query { x: String }").getDirective("relay");if(!r)throw new Error("Failed to create GraphQLRelayDirective.");e.exports={SCHEMA_EXTENSION:i,GraphQLRelayDirective:r}},function(e,t,n){"use strict";e.exports={ID:"id"}},function(module,exports,__webpack_require__){"use strict";var _interopRequireDefault=__webpack_require__(3),_objectSpread2=_interopRequireDefault(__webpack_require__(4)),compileGraphQLTag=__webpack_require__(16),compileRelayQLTag=__webpack_require__(7),getDocumentName=__webpack_require__(31),getValidGraphQLTag=__webpack_require__(32),getValidRelayQLTag=__webpack_require__(33),invariant=__webpack_require__(2),RelayConfig;try{RelayConfig=eval("require")("relay-config")}catch(e){}module.exports=function(e){var t=e.types;if(!t)throw new Error('BabelPluginRelay: Expected plugin context to include "types", but got:'+String(e));var n={TaggedTemplateExpression:function(e,n){var i=getValidGraphQLTag(e);if(i)compileGraphQLTag(t,e,n,i);else{var r=getValidRelayQLTag(e),a=r[0],o=r[1],s=r[2];if(a&&o){var u=n.opts&&n.opts.schema;u||invariant(!1);var l=getDocumentName(e,n);e.replaceWith(compileRelayQLTag(t,e,u,a,l,s,o,!0,n))}}}};return{visitor:{Program:function(e,t){var i=RelayConfig&&RelayConfig.loadConfig();e.traverse(n,(0,_objectSpread2.default)({},t,{opts:(0,_objectSpread2.default)({},i,t.opts)}))}}}}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";var i=n(17),r=n(28),a=n(29);e.exports=function(e,t,n,o){if(1!==o.definitions.length)throw new Error("BabelPluginRelay: Expected exactly one definition per graphql tag.");var s=o.definitions[0];if("FragmentDefinition"!==s.kind&&"OperationDefinition"!==s.kind)throw new Error("BabelPluginRelay: Expected a fragment, mutation, query, or subscription, got `"+s.kind+"`.");return function(e,t,n){for(var i=t.scope;i.parent;)i=i.parent;if(t.scope===i)t.replaceWith(n);else{var r=i.generateDeclaredUidIdentifier("graphql");t.replaceWith(e.logicalExpression("||",r,e.assignmentExpression("=",r,n)))}}(e,t,function(e,t,n,o){var s=Boolean(t.opts&&t.opts.compat),u=Boolean(t.opts&&t.opts.haste),l=t.opts&&t.opts.isDevVariable,c=t.opts&&t.opts.artifactDirectory,f=t.opts&&t.opts.buildCommand||"relay-compiler",p="production"!==(process.env.BABEL_ENV||"production"),m=a(e,o,t,{artifactDirectory:c,buildCommand:f,isDevelopment:p,isHasteMode:u,isDevVariable:l});return s?r(e,m,i(e,n,o,t)):m}(e,n,t,s))}},function(e,t,n){"use strict";var i=n(0),r=n(7),a=n(8),o=n(27),s=n(2);function u(e,t){var n=0,r={},a={},o=null,u={Directive:function(e){switch(e.name.value){case"inline":throw new Error("@inline is only available in pure RelayModern mode.");case"argumentDefinitions":if(o)throw new Error("BabelPluginRelay: Expected only one @argumentDefinitions directive");return o=e.arguments,null;case"connection":return null;default:return e}},FragmentSpread:function(t){var i=t.directives,o=t.name.value,u=null,l=null,c=!0;if(0===i.length)l=o;else{var f=i[0];switch(1!==i.length&&s(!1),f.name.value){case"arguments":case"uncheckedArguments_DEPRECATED":var p={};f.arguments.forEach(function(t){var n=t.value;"Variable"===n.kind&&(a[n.name.value]=null);var i=function(e,t){var n=t.name.value,i=t.value,r=null;switch(i.kind){case"Variable":var a=i.name.value;r=g(e,{kind:e.stringLiteral("CallVariable"),callVariableName:e.stringLiteral(a)});break;default:r=d(e,i)}return{name:n,ast:r}}(e,t);p[i.name]=i.ast}),u=g(e,p),l=o+"_args"+ ++n;break;case"relay":var m=f.arguments;(1!==m.length||"mask"!==m[0].name.value)&&s(!1),l=o,c=!1!==m[0].value.value;break;default:throw new Error("BabelPluginRelay: Unsupported directive `"+f.name.value+"` on fragment spread `..."+o+"`.")}}return l||s(!1),r[l]={name:o,args:u,isMasked:c},Object.assign({},t,{name:{kind:"Name",value:l},directives:[]})},Variable:function(e){return a[e.name.value]=null,e}};return{classicAST:i.visit(t,u),fragments:r,variables:a,argumentDefinitions:o}}var l="RelayQL_GENERATED";function c(e,t,n,i){var r=[e.returnStatement(t)];return n.length>0&&r.unshift(e.variableDeclaration("const",n)),e.functionExpression(null,[e.identifier(l)],e.blockStatement(r))}function f(e,t){return t?e.arrayExpression(t.map(function(t){var n=t.variable.name.value,i=t.defaultValue?d(e,t.defaultValue):e.nullLiteral();return m(e,n,i)})):e.arrayExpression([])}function p(e,t,n){var i=[];return Object.keys(n).forEach(function(n){var r=(t||[]).find(function(e){return e.name.value===n});if(r){var a=r.value.fields.find(function(e){return"defaultValue"===e.name.value}),o=a?d(e,a.value):e.nullLiteral();i.push(m(e,n,o))}else i.push(function(e,t){return e.objectExpression([e.objectProperty(e.identifier("kind"),e.stringLiteral("RootArgument")),e.objectProperty(e.identifier("name"),e.stringLiteral(t))])}(e,n))}),e.arrayExpression(i)}function m(e,t,n){return g(e,{defaultValue:n,kind:e.stringLiteral("LocalArgument"),name:e.stringLiteral(t)})}function d(e,t){switch(t.kind){case"BooleanValue":return e.booleanLiteral(t.value);case"IntValue":return e.numericLiteral(parseInt(t.value,10));case"FloatValue":return e.numericLiteral(parseFloat(t.value));case"StringValue":case"EnumValue":return e.stringLiteral(t.value);case"ListValue":return e.arrayExpression(t.values.map(function(t){return d(e,t)}));default:throw new Error("BabelPluginRelay: Unsupported literal type `"+t.kind+"`.")}}function g(e,t){return e.objectExpression(Object.keys(t).map(function(n){return e.objectProperty(e.identifier(n),t[n])}))}function h(e){var t=e.opts&&e.opts.schema;return t||s(!1),t}function v(e,t,n,a){var s=h(a),u=o(n.name.value),c=u[0],f=u[1],p=i.print(n),m=e.templateLiteral([e.templateElement({raw:p,cooked:p},!0)],[]);return r(e,t,s,m,c,f,l,!1,a)}function y(e,t,n){return Object.keys(n).map(function(i){var r=n[i],a=o(r.name),u=a[0],c=a[1];if(r.isMasked)return e.variableDeclarator(e.identifier(i),function(e,t,n,i,r){var a=[];i&&a.push(e.stringLiteral(i));r&&a.push(r);var o=function(e,t){var n=e.scope.getBinding(t);if(!n)return!1;if("module"===n.kind)return!1;if(n.path.isVariableDeclarator()&&n.path.get("init").node&&n.path.get("init.callee").isIdentifier({name:"require"}))return!1;return!0}(t,n)?e.logicalExpression("||",e.memberExpression(e.identifier(n),e.identifier("__container__")),e.identifier(n)):e.identifier(n);return e.callExpression(e.memberExpression(o,e.identifier("getFragment")),a)}(e,t,u,c,r.args));t.scope.hasBinding(u)||t.scope.hasBinding(c)||s(!1);var f=t.scope.hasBinding(c)?e.memberExpression(e.identifier(c),e.identifier(c)):e.logicalExpression("||",e.memberExpression(e.memberExpression(e.identifier(u),e.identifier(c)),e.identifier(c)),e.memberExpression(e.identifier(u),e.identifier(c)));return e.variableDeclarator(e.identifier(i),e.memberExpression(e.callExpression(e.memberExpression(e.identifier(l),e.identifier("__getClassicFragment")),[f,e.booleanLiteral(!0)]),e.identifier("node")))})}e.exports=function(e,t,n,i){if("FragmentDefinition"===n.kind)return function(e,t,n,i){var r=u(e,n),a=r.classicAST,o=r.fragments,s=r.variables,l=r.argumentDefinitions,f=y(e,t,o),m=g(e,{kind:e.stringLiteral("FragmentDefinition"),argumentDefinitions:p(e,l,s),node:v(e,t,a,i)});return c(e,m,f)}(e,t,n,i);if("OperationDefinition"===n.kind)return function(e,t,n,i){var r=n.name;if(!r)throw new Error("GraphQL operations must contain names");var o=u(e,n),s=o.classicAST,l=o.fragments,p=y(e,t,l),m="query"===s.operation?function(e,t,n,i){var r,o=h(i),s=i.file&&i.file.opts||{},u=a(o,i.opts||{},s);switch(n.operation){case"query":var l=u.schema.getQueryType();if(!l)throw new Error("Schema does not contain a root query type.");r=l.name;break;case"mutation":var c=u.schema.getMutationType();if(!c)throw new Error("Schema does not contain a root mutation type.");r=c.name;break;case"subscription":var f=u.schema.getSubscriptionType();if(!f)throw new Error("Schema does not contain a root subscription type.");r=f.name;break;default:throw new Error("BabelPluginRelay: Unexpected operation type: `"+n.operation+"`.")}var p={kind:"FragmentDefinition",loc:n.loc,name:{kind:"Name",value:n.name.value},typeCondition:{kind:"NamedType",name:{kind:"Name",value:r}},directives:n.directives,selectionSet:n.selectionSet};return v(e,t,p,i)}(e,t,s,i):v(e,t,s,i),d=g(e,{kind:e.stringLiteral("OperationDefinition"),argumentDefinitions:f(e,n.variableDefinitions),name:e.stringLiteral(r.value),operation:e.stringLiteral(s.operation),node:m});return c(e,d,p)}(e,t,n,i);throw new Error("BabelPluginRelay: Expected a fragment, mutation, query, or subscription, got `"+n.kind+"`.")}},function(e,t,n){"use strict";var i=n(5),r=n(1);e.exports=function(e){if(e instanceof i)return"Relay Transform Error: ".concat(e.message);var t=e.sourceText,n=e.validationErrors;if(n&&t){var a=t.split("\n");return n.map(function(e){return"GraphQL Validation Error: "+e.message+"\n"+e.locations.map(function(e){var t=a[e.line-1];return t&&[">","> "+t,"> "+" ".repeat(e.column-1)+"^^^"].join("\n")}).filter(Boolean).join("\n")}).join("\n")}return r.format("Relay Transform Error: %s\n\n%s",e.message,e.stack)}},function(e,t,n){"use strict";var i=n(20),r=n(2),a=n(1),o=n(11),s=o.RelayQLFragment,u=o.RelayQLMutation,l=o.RelayQLQuery,c=o.RelayQLSubscription,f=n(0),p=f.formatError,m=f.parse,d=f.Source,g=f.validate,h=f.FieldsOnCorrectTypeRule,v=f.FragmentsOnCompositeTypesRule,y=f.KnownArgumentNamesRule,b=f.KnownTypeNamesRule,T=f.PossibleFragmentSpreadsRule,N=f.ValuesOfCorrectTypeRule,w=f.VariablesInAllowedPositionRule,x=function(){function e(e,t){this.schema=e,this.options=t}var t=e.prototype;return t.transform=function(e,t,n){var r=this.processTemplateLiteral(t,n.documentName),a=r.substitutions,o=r.templateText,s=r.variableNames,u=this.processTemplateText(o,n),l=this.processDocumentText(u,n);return new(i(e,this.options))(n.tagName,s).print(l,a,n.enableValidation)},t.processTemplateLiteral=function(e,t){var n=this,i=[],a={},o=[];return e.quasis.forEach(function(t,s){var u=t.value.cooked;if(i.push(u),!t.tail){var l="RQL_"+s,c=e.expressions[s];o.push({name:l,value:c}),/:\s*$/.test(u)?(n.options.substituteVariables||r(!1),i.push("$"+l),a[l]=void 0):i.push("..."+l)}}),{substitutions:o,templateText:i.join("").trim(),variableNames:a}},t.processTemplateText=function(e,t){var n=t.documentName,i=t.propName,a=/^(fragment|mutation|query|subscription)\s*(\w*)?([\s\S]*)/.exec(e);a||r(!1);var o=a[1],s=a[2]||n,u=a[3];return"fragment"===o&&"on"===s&&(s=n+(i?"_"+E(i):"")+"RelayQL",u="on"+u),o+" "+E(s)+" "+u},t.processDocumentText=function(e,t){var n=t.documentName,i=t.enableValidation,o=m(new d(e,n)),f=i?this.validateDocument(o,n):null;if(f){var p=new Error(a.format("You supplied a GraphQL document named `%s` with validation errors.",n));throw p.validationErrors=f,p.sourceText=e,p}var g,h=o.definitions[0],v={definitionName:E(n),isPattern:!1,generateID:(g=0,function(){return(g++).toString(32)}),schema:this.schema};if("FragmentDefinition"===h.kind)return new s(v,h);if("OperationDefinition"===h.kind){if("mutation"===h.operation)return new u(v,h);if("query"===h.operation)return new l(v,h);if("subscription"===h.operation)return new c(v,h);r(!1)}else r(!1)},t.validateDocument=function(e,t){1!==e.definitions.length&&r(!1);var n,i=this.options.validator;if(i)n=i().validate(this.schema,e);else{var a=[h,v,y,b,T,N,w];n=g(this.schema,e,a)}return n&&n.length>0?n.map(p):null},e}();function E(e){return e[0].toUpperCase()+e.slice(1)}e.exports=x},function(e,t,n){"use strict";var i=n(3),r=i(n(4)),a=i(n(9)),o=n(5),s=n(10),u=n(1),l=n(11),c=l.RelayQLField,f=l.RelayQLFragment,p=l.RelayQLFragmentSpread,m=l.RelayQLInlineFragment,d=l.RelayQLMutation,g=l.RelayQLQuery,h=l.RelayQLSubscription,v=n(13).ID;e.exports=function(e,t){var n=t.snakeCase?function(e){var t={};return Object.keys(e).forEach(function(e){t[e]=e.replace(/[A-Z]/g,function(e){return"_"+e.toLowerCase()})}),t}:function(e){return e},i=e.arrayExpression([]),l=n({__typename:"__typename",clientMutationId:"clientMutationId",clientSubscriptionId:"clientSubscriptionId",cursor:"cursor",edges:"edges",hasNextPage:"hasNextPage",hasPreviousPage:"hasPreviousPage",node:"node",pageInfo:"pageInfo"}),y=t.inputArgumentName||"input",b=e.nullLiteral(),T=function(){function t(e,t){this.tagName=e,this.variableNames=t}var n=t.prototype;return n.print=function(t,n){var i,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t instanceof g)i=this.printQuery(t,r);else if(t instanceof f)i=this.printFragment(t);else if(t instanceof d)i=this.printMutation(t,r);else{if(!(t instanceof h))throw new o(u.format("Unsupported definition: %s",t),t.getLocation());i=this.printSubscription(t,r)}return e.callExpression(e.functionExpression(null,n.map(function(t){return e.identifier(t.name)}),e.blockStatement([e.returnStatement(i)])),n.map(function(e){return e.value}))},n.printQuery=function(t,n){var i=t.getFields();if(1!==i.length&&n)throw new o(u.format("There are %d fields supplied to the query named `%s`, but queries must have exactly one field.",i.length,t.getName()),t.getLocation());var r=i[0],a=r.getType(),s=r.getArguments(),c={},f=a.getIdentifyingFieldDefinition();f&&(c[f.getName()]=!0),a.isAbstract()&&(c[l.__typename]=!0);var p=this.printSelections(r,c),m={};if(a.isList()&&(m.isPlural=!0),a.isAbstract()&&(m.isAbstract=!0),s.length>1)throw new o(u.format("Invalid root field `%s`; Relay only supports root fields with zero or one argument.",r.getName()),t.getLocation());var d=b;if(1===s.length){var g=s[0],h=g.getName(),v=g.getType().getName({modifiers:!0});m.identifyingArgName=h,m.identifyingArgType=v,d=e.arrayExpression([E({kind:e.valueToNode("Call"),metadata:D({type:v}),name:e.valueToNode(h),value:this.printArgumentValue(g)})])}return E({calls:d,children:p,directives:this.printDirectives(r.getDirectives()),fieldName:e.valueToNode(r.getName()),kind:e.valueToNode("Query"),metadata:D(m),name:e.valueToNode(t.getName()),type:e.valueToNode(a.getName({modifiers:!1}))})},n.printFragment=function(t){var n,i=this,r=t.getType(),a={};r.hasField(v)?a[v]=!0:N(t)&&(n=r.generateIdFragment()),r.isAbstract()&&(a[l.__typename]=!0);var u=this.printSelections(t,a,n?[n]:null,t.hasDirective("generated")),c=_(t),f=c&&s(c.getArguments(),function(e){return"variables"===e.getName()}),p=this.printRelayDirectiveMetadata(t,{isAbstract:r.isAbstract(),isTrackingEnabled:!!f}),m=E({children:u,directives:this.printDirectives(t.getDirectives()),id:this.printFragmentID(t),kind:e.valueToNode("Fragment"),metadata:p,name:e.valueToNode(t.getName()),type:e.valueToNode(r.getName({modifiers:!1}))});if(f){var d=f.getValue();if(!Array.isArray(d))throw new o("The variables argument to the @relay directive should be an array of strings.",t.getLocation());return e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__createFragment")),[m,e.objectExpression(d.map(function(e){var t=e.getValue();return A(t,i.printVariable(t))}))])}return m},n.printFragmentID=function(t){return e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__id")),[])},n.printMutation=function(t,n){var i=t.getFields();if(1!==i.length&&n)throw new o(u.format("There are %d fields supplied to the mutation named `%s`, but mutations must have exactly one field.",i.length,t.getName()),t.getLocation());var r=i[0],a=r.getType();w(r);var s={};a.hasField(l.clientMutationId)&&(s[l.clientMutationId]=!0);var c=this.printSelections(r,s),f={inputType:this.printArgumentTypeForMetadata(r.getDeclaredArgument(y))};return E({calls:e.arrayExpression([E({kind:e.valueToNode("Call"),metadata:D({}),name:e.valueToNode(r.getName()),value:this.printVariable("input")})]),children:c,directives:this.printDirectives(t.getDirectives()),kind:e.valueToNode("Mutation"),metadata:D(f),name:e.valueToNode(t.getName()),responseType:e.valueToNode(a.getName({modifiers:!1}))})},n.printSubscription=function(t,n){var i=t.getFields();if(1!==i.length&&n)throw new o(u.format("There are %d fields supplied to the subscription named `%s`, but subscriptions must have exactly one field.",i.length,t.getName()),t.getLocation());var r=i[0],a=r.getType();w(r);var s={};a.hasField(l.clientSubscriptionId)&&(s[l.clientSubscriptionId]=!0),a.hasField(l.clientMutationId)&&(s[l.clientMutationId]=!0);var c=this.printSelections(r,s),f={inputType:this.printArgumentTypeForMetadata(r.getDeclaredArgument(y))};return E({calls:e.arrayExpression([E({kind:e.valueToNode("Call"),metadata:D({}),name:e.valueToNode(r.getName()),value:this.printVariable("input")})]),children:c,directives:this.printDirectives(t.getDirectives()),kind:e.valueToNode("Subscription"),metadata:D(f),name:e.valueToNode(t.getName()),responseType:e.valueToNode(a.getName({modifiers:!1}))})},n.printSelections=function(t,n,r){var s=this,l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],f=[],d=[],g=!1;t.getSelections().forEach(function(e){if(e instanceof p){if(0!==e.getDirectives().length)throw new o("Directives are not yet supported for `${fragment}`-style fragment references.",e.getLocation());d.push(s.printFragmentReference(e)),g=!0}else if(e instanceof m)d.push(s.printFragment(e.getFragment()));else{if(!(e instanceof c))throw new o(u.format("Unsupported selection type `%s`.",e),e.getLocation());f.push(e)}}),r&&r.forEach(function(e){d.push(s.printFragment(e))});var h,v=this.printFields(f,t,n,l),y=[].concat((0,a.default)(v),d);if(y.length){var T=e.arrayExpression(y);return g?(h=T,e.callExpression(e.memberExpression(e.memberExpression(i,e.identifier("concat")),e.identifier("apply")),[i,h])):T}return b},n.printFields=function(e,t,n){var i=this,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=t.getType();o.isConnection()&&o.hasField(l.pageInfo)&&e.some(function(e){return e.getName()===l.edges})&&(n[l.pageInfo]=!0);var s=(0,r.default)({},n),u=[];return e.forEach(function(e){delete s[e.getName()],u.push(i.printField(e,t,n,s,a))}),Object.keys(s).forEach(function(e){var r=o.generateField(e);u.push(i.printField(r,t,n,s,a))}),u},n.printField=function(t,n,i,r){var a,s=this,c=arguments.length>4&&void 0!==arguments[4]&&arguments[4],f=t.getType(),p={},m={};f.hasField(v)?m[v]=!0:N(t)&&(a=f.generateIdFragment()),c||function(e,t){if("node"===e.getName()){var n=e.getDeclaredArguments(),i=Object.keys(n);if(!t.isQueryType()&&1===i.length&&i[0]===v)throw new o(u.format("You defined a `node(%s: %s)` field on type `%s`, but Relay requires the `node` field to be defined on the root type. See the Object Identification Guide: \nhttps://relay.dev/docs/en/graphql-server-specification#object-identification",v,i[0]&&n[i[0]].getName({modifiers:!0}),t.getName({modifiers:!1})),e.getLocation())}}(t,n.getType()),f.canHaveSubselections()&&(p.canHaveSubselections=!0),f.alwaysImplements("Node")&&(p.inferredRootCallName="node",p.inferredPrimaryKey=v),f.isConnection()?(t.hasDeclaredArgument("first")||t.hasDeclaredArgument("last"))&&(c||function(e){var t=[e.findArgument("first"),e.findArgument("last"),e.findArgument("before"),e.findArgument("after")],n=t[0],i=t[1],r=t[2],a=t[3],s=!n||!i||n.isVariable()&&i.isVariable();if(!s)throw new o(u.format("Connection arguments `%s(first: <count>, last: <count>)` are not supported unless both are variables. Use `(first: <count>)`, `(last: <count>)`, or `(first: $<var>, last: $<var>)`.",e.getName()),e.getLocation());if(!(s=!n||!r||n.isVariable()&&r.isVariable()))throw new o(u.format("Connection arguments `%s(before: <cursor>, first: <count>)` are not supported unless both are variables. Use `(first: <count>)`, `(after: <cursor>, first: <count>)`, `(before: <cursor>, last: <count>)`, or `(before: $<var>, first: $<var>)`.",e.getName()),e.getLocation());if(!(s=!i||!a||i.isVariable()&&a.isVariable()))throw new o(u.format("Connection arguments `%s(after: <cursor>, last: <count>)` are not supported unless both are variables. Use `(last: <count>)`, `(before: <cursor>, last: <count>)`, `(after: <cursor>, first: <count>)`, or `(after: $<var>, last: $<var>)`.",e.getName()),e.getLocation());var c=e.getType().getFieldDefinition(l.edges).getType().getFieldDefinition(l.node).getType();x(e,function(t){if(t.getName()===l.edges||t.getName()===l.pageInfo){var n=e.isPattern()||e.hasArgument("find")||e.hasArgument("first")||e.hasArgument("last");if(!n)throw new o(u.format("You supplied the `%s` field on a connection named `%s`, but you did not supply an argument necessary for Relay to handle the connection. Please specify a limit argument like `first`, or `last` or fetch a specific item with a `find` argument.",t.getName(),e.getName()),e.getLocation())}else{var i=t.getType(),r=i.isList()&&i.getName({modifiers:!1})===c.getName({modifiers:!1});if(r)throw new o(u.format("You supplied a field named `%s` on a connection named `%s`, but pagination is not supported on connections without using `%s`. Use `%s{%s{%s{...}}}` instead.",t.getName(),e.getName(),l.edges,e.getName(),l.edges,l.node),e.getLocation())}})}(t),p.isConnection=!0,t.hasDeclaredArgument("find")&&(p.isFindable=!0)):f.isConnectionPageInfo()?(m[l.hasNextPage]=!0,m[l.hasPreviousPage]=!0):f.isConnectionEdge()&&(m[l.cursor]=!0,m[l.node]=!0),f.isAbstract()&&(p.isAbstract=!0,m[l.__typename]=!0),f.isList()&&(p.isPlural=!0),r.hasOwnProperty(t.getName())&&(p.isGenerated=!0),i.hasOwnProperty(t.getName())&&(p.isRequisite=!0);var d=this.printSelections(t,m,a?[a]:null,c),g=t.getAlias(),h=t.getArguments(),y=h.length?e.arrayExpression(h.map(function(e){return s.printArgument(e)})):b;return E({alias:g?e.valueToNode(g):b,calls:y,children:d,directives:this.printDirectives(t.getDirectives()),fieldName:e.valueToNode(t.getName()),kind:e.valueToNode("Field"),metadata:this.printRelayDirectiveMetadata(t,p),type:e.valueToNode(f.getName({modifiers:!1}))})},n.printFragmentReference=function(t){return e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__frag")),[e.identifier(t.getName())])},n.printArgument=function(t){var n={},i=this.printArgumentTypeForMetadata(t.getType());return i&&(n.type=i),E({kind:e.valueToNode("Call"),metadata:D(n),name:e.valueToNode(t.getName()),value:this.printArgumentValue(t)})},n.printArgumentValue=function(e){return e.isVariable()?this.printVariable(e.getVariableName()):this.printValue(e.getValue())},n.printVariable=function(t){return this.variableNames.hasOwnProperty(t)?e.callExpression(e.memberExpression(L(this.tagName),e.identifier("__var")),[e.identifier(t)]):E({kind:e.valueToNode("CallVariable"),callVariableName:e.valueToNode(t)})},n.printValue=function(t){var n=this;return Array.isArray(t)?e.arrayExpression(t.map(function(e){return n.printArgumentValue(e)})):E({kind:e.valueToNode("CallValue"),callValue:null==t?e.nullLiteral():k(t)})},n.printDirectives=function(t){var n=this,i=[];return t.forEach(function(t){"relay"!==t.getName()&&i.push(e.objectExpression([A("kind",e.valueToNode("Directive")),A("name",e.valueToNode(t.getName())),A("args",e.arrayExpression(t.getArguments().map(function(t){return e.objectExpression([A("name",e.valueToNode(t.getName())),A("value",n.printArgumentValue(t))])})))]))}),i.length?e.arrayExpression(i):b},n.printRelayDirectiveMetadata=function(t,n){var i=[],r=_(t);if(r&&r.getArguments().forEach(function(n){if(n.isVariable())throw new o(u.format("You supplied `$%s` as the `%s` argument to the `@relay` directive, but `@relay` require scalar argument values.",n.getVariableName(),n.getName()),t.getLocation());"variables"!==n.getName()&&i.push(A(n.getName(),e.valueToNode(n.getValue())))}),n){var a=n;Object.keys(a).forEach(function(t){a[t]&&i.push(A(t,e.valueToNode(a[t])))})}return e.objectExpression(i)},n.printArgumentTypeForMetadata=function(e){return e.isBoolean()||e.isID()||e.isString()?null:e.getName({modifiers:!0})},t}();function N(e){return e.getType().mayImplement("Node")&&!e.getSelections().some(function(e){return e instanceof m&&"Node"===e.getFragment().getType().getName({modifiers:!1})})}function w(e){var t=e.getDeclaredArguments(),n=Object.keys(t);if(1!==n.length)throw new o(u.format("Your schema defines a mutation field `%s` that takes %d arguments, but mutation fields must have exactly one argument named `%s`.",e.getName(),n.length,y),e.getLocation());if(n[0]!==y)throw new o(u.format("Your schema defines a mutation field `%s` that takes an argument named `%s`, but mutation fields must have exactly one argument named `%s`.",e.getName(),n[0],y),e.getLocation());var i=e.getArguments();if(i.length>1)throw new o(u.format("There are %d arguments supplied to the mutation field named `%s`, but mutation fields must have exactly one `%s` argument.",i.length,e.getName(),y),e.getLocation())}var x=function e(t,n){t.getSelections().forEach(function(t){t instanceof c?n(t):t instanceof m&&e(t.getFragment(),n)})};function E(t){var n=[];return Object.keys(t).forEach(function(e){var i=t[e];i!==b&&n.push(A(e,i))}),e.objectExpression(n)}function L(t){return t.split(".").reduce(function(t,n){return t?e.memberExpression(t,e.identifier(n)):e.identifier(n)},null)}function D(t){var n=[];return Object.keys(t).forEach(function(i){var r=t[i];r&&n.push(A(i,e.valueToNode(r)))}),e.objectExpression(n)}function A(t,n){return e.objectProperty(e.identifier(t),n)}function k(t){if(null==t)return b;if(Array.isArray(t))return e.arrayExpression(t.map(k));if("object"==typeof t&&null!=t){var n=t;return e.objectExpression(Object.keys(n).map(function(e){return A(e,k(n[e]))}))}return e.valueToNode(t)}function _(e){return s(e.getDirectives(),function(e){return"relay"===e.getName()})}return T}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";var i=n(12).SCHEMA_EXTENSION,r=n(26),a=n(0).parse,o=n(6);function s(e,t){var n=!r.existsSync(e)&&t?o.join(t,e):e;return r.readFileSync(n,"utf8")}e.exports=function(e,t){try{var n=e.split(",");if(n.length>1)return a(i+"\n"+n.map(function(e){return s(e,t)}).join("\n"));var r=s(e,t);return"{"===r[0]?JSON.parse(r):a(i+"\n"+r)}catch(t){throw console.error("Encountered the following error while loading the GraphQL schema: "+e+"\n\n"+t.stack.split("\n").map(function(e){return"> "+e}).join("\n")),t}}},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";var i="data";e.exports=function(e){var t=e.match(/^([a-zA-Z][a-zA-Z0-9]*)(?:_([a-zA-Z][_a-zA-Z0-9]*))?$/);if(!t)throw new Error("BabelPluginGraphQL: Fragments should be named `ModuleName_fragmentName`, got `"+e+"`.");var n=t[1],r=t[2];if(r===i)throw new Error("BabelPluginGraphQL: Fragment `"+e+"` should not end in `_data` to avoid conflict with a fragment named `"+n+"` which also provides resulting data via the React prop `data`. Either rename this fragment to `"+n+"` or choose a different prop name.");return[n,r||i]}},function(e,t,n){"use strict";e.exports=function(e,t,n){return e.objectExpression([e.objectProperty(e.identifier("modern"),t),e.objectProperty(e.identifier("classic"),n)])}},function(e,t,n){"use strict";var i=n(3)(n(9)),r=n(30),a=n(2),o=n(6),s=n(0).print,u="./__generated__/";function l(e,t,n){return e.callExpression(e.memberExpression(e.identifier("console"),e.identifier("error")),[e.stringLiteral("The definition of '".concat(t,"' appears to have changed. Run ")+"`"+n+"` to update the generated files to receive the expected data.")])}e.exports=function(e,t,n,c){var f=t.name&&t.name.value;if(!f)throw new Error("GraphQL operations and fragments must contain names");var p=f+".graphql",m=c.isHasteMode?p:c.artifactDirectory?function(e,t,n){null==e.file&&a(!1);var i=e.file.opts.filename,r=o.relative(o.dirname(i),o.resolve(t));return(0!==r.length&&r.startsWith(".")?"":"./")+o.join(r,n)}(n,c.artifactDirectory,p):u+p,d=r.createHash("md5").update(s(t),"utf8").digest("hex"),g=e.callExpression(e.identifier("require"),[e.stringLiteral(m)]),h=[e.returnStatement(g)];if(null!=c.isDevVariable||c.isDevelopment){var v=e.identifier("node"),y=e.memberExpression(v,e.identifier("hash")),b=[e.variableDeclaration("const",[e.variableDeclarator(v,g)]),e.ifStatement(e.logicalExpression("&&",y,e.binaryExpression("!==",y,e.stringLiteral(d))),e.blockStatement([e.expressionStatement(l(e,f,c.buildCommand))]))];null!=c.isDevVariable&&(b=[e.ifStatement(e.identifier(c.isDevVariable),e.blockStatement(b))]),h.unshift.apply(h,(0,i.default)(b))}return e.functionExpression(null,[],e.blockStatement(h))}},function(e,t){e.exports=require("crypto")},function(e,t,n){"use strict";var i=n(6).basename,r="providesModule";e.exports=function(e,t){for(var n=e;n.parentPath;)n=n.parentPath;var a=n.documentName;if(!a){var o=n.parent;if(o.comments&&o.comments.length)for(var s,u=o.comments[0].value||"",l=/@(\S+) *(\S*)/g;s=l.exec(u);){var c=s[1],f=s[2];if(c===r){a=f.replace(/[\.-:]/g,"_");break}}var p=t.file&&t.file.opts&&t.file.opts.filename&&i(t.file.opts.filename);if(p&&!a){var m=p.match(/^[_A-Za-z][_0-9A-Za-z]*/);m&&(a=m[0])}a=a||"UnknownFile",n.documentName=a}return a}},function(e,t,n){"use strict";var i=n(0);e.exports=function(e){if(!e.get("tag").isIdentifier({name:"graphql"}))return null;var t=e.node.quasi.quasis;if(1!==t.length)throw new Error("BabelPluginRelay: Substitutions are not allowed in graphql fragments. Included fragments should be referenced as `...MyModule_propName`.");var n=t[0].value.raw,r=i.parse(n);if(0===r.definitions.length)throw new Error("BabelPluginRelay: Unexpected empty graphql tag.");return r}},function(e,t,n){"use strict";e.exports=function(e){var t=e.node,n=e.get("tag"),i=n.matchesPattern("Relay.QL")?"Relay.QL":n.matchesPattern("RelayClassic_DEPRECATED.QL")?"RelayClassic_DEPRECATED.QL":n.matchesPattern("RelayClassic.QL")?"RelayClassic.QL":n.isIdentifier({name:"RelayQL"})?"RelayQL":null;if(!i)return[null,null,null];for(var r=e,a=null;!a&&(r=r.parentPath);)r.isProperty()&&(a=r.node.key.name);return[t.quasi,i,a]}}]);
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v4.0.0
2
+ * Relay v5.0.0
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
5
5
  *
@@ -9,6 +9,10 @@
9
9
  */
10
10
  'use strict';
11
11
 
12
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
13
+
14
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
15
+
12
16
  var compileGraphQLTag = require("./compileGraphQLTag");
13
17
 
14
18
  var compileRelayQLTag = require("./compileRelayQLTag");
@@ -21,6 +25,13 @@ var getValidRelayQLTag = require("./getValidRelayQLTag");
21
25
 
22
26
  var invariant = require("./invariant");
23
27
 
28
+ var RelayConfig;
29
+
30
+ try {
31
+ // eslint-disable-next-line no-eval
32
+ RelayConfig = eval('require')('relay-config'); // eslint-disable-next-line lint/no-unused-catch-bindings
33
+ } catch (_) {}
34
+
24
35
  /**
25
36
  * Using babel-plugin-relay with only the modern runtime?
26
37
  *
@@ -64,7 +75,7 @@ module.exports = function BabelPluginRelay(context) {
64
75
 
65
76
  if (quasi && tagName) {
66
77
  var schema = state.opts && state.opts.schema;
67
- !schema ? process.env.NODE_ENV !== "production" ? invariant(false, 'babel-plugin-relay: Missing schema option. ' + 'Check your .babelrc file or wherever you configure your Babel ' + 'plugins to ensure the "relay" plugin has a "schema" option.\n' + 'https://facebook.github.io/relay/docs/babel-plugin-relay.html#additional-options') : invariant(false) : void 0;
78
+ !schema ? process.env.NODE_ENV !== "production" ? invariant(false, 'babel-plugin-relay: Missing schema option. ' + 'Check your .babelrc file or wherever you configure your Babel ' + 'plugins to ensure the "relay" plugin has a "schema" option.\n' + 'https://relay.dev/docs/en/installation-and-setup#set-up-babel-plugin-relay') : invariant(false) : void 0;
68
79
  var documentName = getDocumentName(path, state);
69
80
  path.replaceWith(compileRelayQLTag(t, path, schema, quasi, documentName, propName, tagName, true, // enableValidation
70
81
  state));
@@ -74,7 +85,10 @@ module.exports = function BabelPluginRelay(context) {
74
85
  return {
75
86
  visitor: {
76
87
  Program: function Program(path, state) {
77
- path.traverse(visitor, state);
88
+ var config = RelayConfig && RelayConfig.loadConfig();
89
+ path.traverse(visitor, (0, _objectSpread2["default"])({}, state, {
90
+ opts: (0, _objectSpread2["default"])({}, config, state.opts)
91
+ }));
78
92
  }
79
93
  }
80
94
  };
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * strict
7
+ *
8
8
  * @fullSyntaxTransform
9
9
  * @format
10
10
  */
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * strict
7
+ *
8
8
  * @format
9
9
  */
10
10
  'use strict';
@@ -338,7 +338,7 @@ module.exports = function (t, options) {
338
338
  }
339
339
 
340
340
  var printedFields = this.printFields(fields, parent, requisiteFields, isGeneratedQuery);
341
- var selections = (0, _toConsumableArray2["default"])(printedFields).concat(printedFragments);
341
+ var selections = [].concat((0, _toConsumableArray2["default"])(printedFields), printedFragments);
342
342
 
343
343
  if (selections.length) {
344
344
  var arrayExpressionOfSelections = t.arrayExpression(selections);
@@ -569,11 +569,11 @@ module.exports = function (t, options) {
569
569
  }
570
570
 
571
571
  return t.objectExpression(properties);
572
- };
572
+ }
573
573
  /**
574
574
  * Prints the type for arguments that are transmitted via variables.
575
575
  */
576
-
576
+ ;
577
577
 
578
578
  _proto.printArgumentTypeForMetadata = function printArgumentTypeForMetadata(argType) {
579
579
  // Only booleans and strings can be safely inlined, which is indicated to
@@ -619,7 +619,7 @@ module.exports = function (t, options) {
619
619
  var argNames = Object.keys(argTypes);
620
620
 
621
621
  if (!parentType.isQueryType() && argNames.length === 1 && argNames[0] === ID) {
622
- throw new RelayTransformError(util.format('You defined a `node(%s: %s)` field on type `%s`, but Relay requires ' + 'the `node` field to be defined on the root type. See the Object ' + 'Identification Guide: \n' + 'https://facebook.github.io/relay/docs/en/graphql-server-specification.html#object-identification', ID, argNames[0] && argTypes[argNames[0]].getName({
622
+ throw new RelayTransformError(util.format('You defined a `node(%s: %s)` field on type `%s`, but Relay requires ' + 'the `node` field to be defined on the root type. See the Object ' + 'Identification Guide: \n' + 'https://relay.dev/docs/en/graphql-server-specification#object-identification', ID, argNames[0] && argTypes[argNames[0]].getName({
623
623
  modifiers: true
624
624
  }), parentType.getName({
625
625
  modifiers: false
@@ -60,13 +60,13 @@ function () {
60
60
  var definition = this.processDocumentText(documentText, options);
61
61
  var Printer = RelayQLPrinter(t, this.options);
62
62
  return new Printer(options.tagName, variableNames).print(definition, substitutions, options.enableValidation);
63
- };
63
+ }
64
64
  /**
65
65
  * Convert TemplateLiteral into a single template string with substitution
66
66
  * names, a matching array of substituted values, and a set of substituted
67
67
  * variable names.
68
68
  */
69
-
69
+ ;
70
70
 
71
71
  _proto.processTemplateLiteral = function processTemplateLiteral(node, documentName) {
72
72
  var _this = this;
@@ -100,11 +100,11 @@ function () {
100
100
  templateText: chunks.join('').trim(),
101
101
  variableNames: variableNames
102
102
  };
103
- };
103
+ }
104
104
  /**
105
105
  * Converts the template string into a valid GraphQL document string.
106
106
  */
107
-
107
+ ;
108
108
 
109
109
  _proto.processTemplateText = function processTemplateText(templateText, _ref) {
110
110
  var documentName = _ref.documentName,
@@ -123,11 +123,11 @@ function () {
123
123
 
124
124
  var definitionName = capitalize(name);
125
125
  return type + ' ' + definitionName + ' ' + rest;
126
- };
126
+ }
127
127
  /**
128
128
  * Parses the GraphQL document string into a RelayQLDocument.
129
129
  */
130
-
130
+ ;
131
131
 
132
132
  _proto.processDocumentText = function processDocumentText(documentText, _ref2) {
133
133
  var documentName = _ref2.documentName,
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * strict
7
+ *
8
8
  * @fullSyntaxTransform
9
9
  * @format
10
10
  */
@@ -293,7 +293,7 @@ function createObject(t, obj) {
293
293
 
294
294
  function getSchemaOption(state) {
295
295
  var schema = state.opts && state.opts.schema;
296
- !schema ? process.env.NODE_ENV !== "production" ? invariant(false, 'babel-plugin-relay: Missing schema option. ' + 'Check your .babelrc file or wherever you configure your Babel ' + 'plugins to ensure the "relay" plugin has a "schema" option.\n' + 'https://facebook.github.io/relay/docs/babel-plugin-relay.html#additional-options') : invariant(false) : void 0;
296
+ !schema ? process.env.NODE_ENV !== "production" ? invariant(false, 'babel-plugin-relay: Missing schema option. ' + 'Check your .babelrc file or wherever you configure your Babel ' + 'plugins to ensure the "relay" plugin has a "schema" option.\n' + 'https://relay.dev/docs/en/installation-and-setup#set-up-babel-plugin-relay') : invariant(false) : void 0;
297
297
  return schema;
298
298
  }
299
299
 
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * strict
7
+ *
8
8
  * @format
9
9
  */
10
10
  'use strict';
@@ -9,16 +9,16 @@
9
9
  */
10
10
  'use strict';
11
11
 
12
- var fs = require("fs");
13
-
14
- var path = require("path");
15
-
16
12
  var _require = require("./GraphQLRelayDirective"),
17
13
  SCHEMA_EXTENSION = _require.SCHEMA_EXTENSION;
18
14
 
15
+ var fs = require("fs");
16
+
19
17
  var _require2 = require("graphql"),
20
18
  parse = _require2.parse;
21
19
 
20
+ var path = require("path");
21
+
22
22
  function readSource(sourceFile, basePath) {
23
23
  var fullSourceFile = !fs.existsSync(sourceFile) && basePath ? path.join(basePath, sourceFile) : sourceFile;
24
24
  return fs.readFileSync(fullSourceFile, 'utf8');
package/macro.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v4.0.0
2
+ * Relay v5.0.0
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
5
5
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "babel-plugin-relay",
3
3
  "description": "A Babel Plugin for use with Relay applications.",
4
- "version": "4.0.0",
4
+ "version": "5.0.0",
5
5
  "keywords": [
6
6
  "graphql",
7
7
  "relay",
@@ -9,7 +9,7 @@
9
9
  "babel-plugin"
10
10
  ],
11
11
  "license": "MIT",
12
- "homepage": "https://facebook.github.io/relay/",
12
+ "homepage": "https://relay.dev",
13
13
  "bugs": "https://github.com/facebook/relay/issues",
14
14
  "repository": "facebook/relay",
15
15
  "dependencies": {