You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
!Array.isArray(interfaces) ? (0,_invariant.default)(0,"".concat(type.name," interfaces must be an Array or a function which returns ")+'an Array.') : void0;
!Array.isArray(interfaces) ? (0,_invariant.default)(0,"".concat(config.name," interfaces must be an Array or a function which returns ")+'an Array.') : void0;
541
548
returninterfaces;
542
549
}
543
550
544
-
functiondefineFieldMap(type,fieldsThunk){
545
-
varfieldMap=resolveThunk(fieldsThunk)||{};
546
-
!isPlainObj(fieldMap) ? (0,_invariant.default)(0,"".concat(type.name," fields must be an object with field names as keys or a ")+'function which returns such an object.') : void0;
551
+
functiondefineFieldMap(config){
552
+
varfieldMap=resolveThunk(config.fields)||{};
553
+
!isPlainObj(fieldMap) ? (0,_invariant.default)(0,"".concat(config.name," fields must be an object with field names as keys or a ")+'function which returns such an object.') : void0;
!isPlainObj(fieldConfig) ? (0,_invariant.default)(0,"".concat(type.name,".").concat(fieldName," field config must be an object")) : void0;
551
-
!!fieldConfig.hasOwnProperty('isDeprecated') ? (0,_invariant.default)(0,"".concat(type.name,".").concat(fieldName," should provide \"deprecationReason\" instead ")+'of "isDeprecated".') : void0;
557
+
!isPlainObj(fieldConfig) ? (0,_invariant.default)(0,"".concat(config.name,".").concat(fieldName," field config must be an object")) : void0;
558
+
!!fieldConfig.hasOwnProperty('isDeprecated') ? (0,_invariant.default)(0,"".concat(config.name,".").concat(fieldName," should provide \"deprecationReason\" ")+'instead of "isDeprecated".') : void0;
!isValidResolver(field.resolve) ? (0,_invariant.default)(0,"".concat(type.name,".").concat(fieldName," field resolver must be a function if ")+"provided, but got: ".concat((0,_inspect.default)(field.resolve),".")) : void0;
565
+
!isValidResolver(field.resolve) ? (0,_invariant.default)(0,"".concat(config.name,".").concat(fieldName," field resolver must be a function if ")+"provided, but got: ".concat((0,_inspect.default)(field.resolve),".")) : void0;
559
566
varargsConfig=fieldConfig.args;
560
567
561
568
if(!argsConfig){
562
569
field.args=[];
563
570
}else{
564
-
!isPlainObj(argsConfig) ? (0,_invariant.default)(0,"".concat(type.name,".").concat(fieldName," args must be an object with argument ")+'names as keys.') : void0;
571
+
!isPlainObj(argsConfig) ? (0,_invariant.default)(0,"".concat(config.name,".").concat(fieldName," args must be an object with argument ")+'names as keys.') : void0;
!Array.isArray(types) ? (0,_invariant.default)(0,'Must provide Array of types or a function which returns '+"such an array for Union ".concat(unionType.name,".")) : void0;
741
+
functiondefineTypes(config){
742
+
vartypes=resolveThunk(config.types)||[];
743
+
!Array.isArray(types) ? (0,_invariant.default)(0,'Must provide Array of types or a function which returns '+"such an array for Union ".concat(config.name,".")) : void0;
!isPlainObj(fieldMap) ? (0,_invariant.default)(0,"".concat(this.name," fields must be an object with field names as keys or a ")+'function which returns such an object.') : void0;
!!field.hasOwnProperty('resolve') ? (0,_invariant.default)(0,"".concat(_this.name,".").concat(fieldName," field type has a resolve property, but ")+'Input Types cannot define resolvers.') : void0;
!isPlainObj(fieldMap) ? (0,_invariant.default)(0,"".concat(config.name," fields must be an object with field names as keys or a ")+'function which returns such an object.') : void0;
!!field.hasOwnProperty('resolve') ? (0,_invariant.default)(0,"".concat(config.name,".").concat(fieldName," field type has a resolve property, but ")+'Input Types cannot define resolvers.') : void0;
0 commit comments