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
1874
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.4 to 6.0.5-alpha-9d37c5d.0

15

index.cjs.js

@@ -37,3 +37,2 @@ 'use strict';

Object.keys(operationTypes).forEach((operation) => {
const resolveField = operation === 'subscription' ? 'subscribe' : 'resolve';
const rootType = operationTypes[operation];

@@ -53,5 +52,13 @@ if (rootType != null) {

const finalResolver = createPossiblyNestedProxyingResolver(subschemaOrSubschemaConfig, proxyingResolver);
resolvers[typeName][fieldName] = {
[resolveField]: finalResolver,
};
if (operation === 'subscription') {
resolvers[typeName][fieldName] = {
subscribe: finalResolver,
resolve: (payload) => payload[fieldName],
};
}
else {
resolvers[typeName][fieldName] = {
resolve: finalResolver,
};
}
});

@@ -58,0 +65,0 @@ }

@@ -33,3 +33,2 @@ 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';

Object.keys(operationTypes).forEach((operation) => {
const resolveField = operation === 'subscription' ? 'subscribe' : 'resolve';
const rootType = operationTypes[operation];

@@ -49,5 +48,13 @@ if (rootType != null) {

const finalResolver = createPossiblyNestedProxyingResolver(subschemaOrSubschemaConfig, proxyingResolver);
resolvers[typeName][fieldName] = {
[resolveField]: finalResolver,
};
if (operation === 'subscription') {
resolvers[typeName][fieldName] = {
subscribe: finalResolver,
resolve: (payload) => payload[fieldName],
};
}
else {
resolvers[typeName][fieldName] = {
resolve: finalResolver,
};
}
});

@@ -54,0 +61,0 @@ }

{
"name": "@graphql-tools/wrap",
"version": "6.0.4",
"version": "6.0.5-alpha-9d37c5d.0",
"description": "A set of utils for faster development of GraphQL tools",

@@ -10,5 +10,5 @@ "sideEffects": false,

"dependencies": {
"@graphql-tools/delegate": "6.0.4",
"@graphql-tools/schema": "6.0.4",
"@graphql-tools/utils": "6.0.4",
"@graphql-tools/delegate": "6.0.5-alpha-9d37c5d.0",
"@graphql-tools/schema": "6.0.5-alpha-9d37c5d.0",
"@graphql-tools/utils": "6.0.5-alpha-9d37c5d.0",
"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