New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-tools/wrap

Package Overview
Dependencies
Maintainers
3
Versions
1769
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/wrap - npm Package Compare versions

Comparing version 6.0.2-alpha-d0c2594.0 to 6.0.2

24

index.cjs.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc