@graphql-tools/wrap
Advanced tools
Comparing version 6.0.2-alpha-d0c2594.0 to 6.0.2
@@ -959,18 +959,16 @@ 'use strict'; | ||
function getSchemaFromIntrospection(introspectionResult) { | ||
if ((Array.isArray(introspectionResult.errors) && introspectionResult.errors.length) || | ||
!introspectionResult.data.__schema) { | ||
if (Array.isArray(introspectionResult.errors)) { | ||
if (introspectionResult.errors.length > 1) { | ||
const combinedError = new utils.CombinedError(introspectionResult.errors); | ||
throw combinedError; | ||
} | ||
const error = introspectionResult.errors[0]; | ||
throw error.originalError || error; | ||
var _a, _b; | ||
if ((_a = introspectionResult === null || introspectionResult === void 0 ? void 0 : introspectionResult.data) === null || _a === void 0 ? void 0 : _a.__schema) { | ||
return graphql.buildClientSchema(introspectionResult.data); | ||
} | ||
else if ((_b = introspectionResult === null || introspectionResult === void 0 ? void 0 : introspectionResult.errors) === null || _b === void 0 ? void 0 : _b.length) { | ||
if (introspectionResult.errors.length > 1) { | ||
const combinedError = new utils.CombinedError(introspectionResult.errors); | ||
throw combinedError; | ||
} | ||
else { | ||
throw new Error('Could not obtain introspection result, received: ' + JSON.stringify(introspectionResult)); | ||
} | ||
const error = introspectionResult.errors[0]; | ||
throw error.originalError || error; | ||
} | ||
else { | ||
return graphql.buildClientSchema(introspectionResult.data); | ||
throw new Error('Could not obtain introspection result, received: ' + JSON.stringify(introspectionResult)); | ||
} | ||
@@ -977,0 +975,0 @@ } |
@@ -955,18 +955,16 @@ import { GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, isSpecifiedScalarType, isScalarType, isObjectType, isInterfaceType, isUnionType, isInputObjectType, GraphQLInputObjectType, isEnumType, GraphQLEnumType, GraphQLScalarType, visit, Kind, TypeInfo, visitWithTypeInfo, extendSchema, parse, getNullableType, BREAK, buildSchema, getIntrospectionQuery, buildClientSchema } from 'graphql'; | ||
function getSchemaFromIntrospection(introspectionResult) { | ||
if ((Array.isArray(introspectionResult.errors) && introspectionResult.errors.length) || | ||
!introspectionResult.data.__schema) { | ||
if (Array.isArray(introspectionResult.errors)) { | ||
if (introspectionResult.errors.length > 1) { | ||
const combinedError = new CombinedError(introspectionResult.errors); | ||
throw combinedError; | ||
} | ||
const error = introspectionResult.errors[0]; | ||
throw error.originalError || error; | ||
var _a, _b; | ||
if ((_a = introspectionResult === null || introspectionResult === void 0 ? void 0 : introspectionResult.data) === null || _a === void 0 ? void 0 : _a.__schema) { | ||
return buildClientSchema(introspectionResult.data); | ||
} | ||
else if ((_b = introspectionResult === null || introspectionResult === void 0 ? void 0 : introspectionResult.errors) === null || _b === void 0 ? void 0 : _b.length) { | ||
if (introspectionResult.errors.length > 1) { | ||
const combinedError = new CombinedError(introspectionResult.errors); | ||
throw combinedError; | ||
} | ||
else { | ||
throw new Error('Could not obtain introspection result, received: ' + JSON.stringify(introspectionResult)); | ||
} | ||
const error = introspectionResult.errors[0]; | ||
throw error.originalError || error; | ||
} | ||
else { | ||
return buildClientSchema(introspectionResult.data); | ||
throw new Error('Could not obtain introspection result, received: ' + JSON.stringify(introspectionResult)); | ||
} | ||
@@ -973,0 +971,0 @@ } |
{ | ||
"name": "@graphql-tools/wrap", | ||
"version": "6.0.2-alpha-d0c2594.0", | ||
"version": "6.0.2", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -10,5 +10,5 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@graphql-tools/delegate": "6.0.2-alpha-d0c2594.0", | ||
"@graphql-tools/schema": "6.0.2-alpha-d0c2594.0", | ||
"@graphql-tools/utils": "6.0.2-alpha-d0c2594.0", | ||
"@graphql-tools/delegate": "6.0.2", | ||
"@graphql-tools/schema": "6.0.2", | ||
"@graphql-tools/utils": "6.0.2", | ||
"tslib": "~2.0.0" | ||
@@ -15,0 +15,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
255318
1
2247
+ Added@graphql-tools/delegate@6.0.2(transitive)
+ Added@graphql-tools/schema@6.0.2(transitive)
+ Added@graphql-tools/utils@6.0.2(transitive)
- Removed@graphql-tools/delegate@6.0.2-alpha-d0c2594.0(transitive)
- Removed@graphql-tools/schema@6.0.2-alpha-d0c2594.0(transitive)
- Removed@graphql-tools/utils@6.0.2-alpha-d0c2594.0(transitive)
Updated@graphql-tools/schema@6.0.2
Updated@graphql-tools/utils@6.0.2