Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-tools/wrap

Package Overview
Dependencies
Maintainers
3
Versions
1333
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.0-alpha-0bfc960.0 to 6.0.0-alpha-23e0ae8.0

7

index.cjs.js

@@ -762,7 +762,7 @@ 'use strict';

transformSchema(schema) {
let [newSchema, targetFieldConfigMap] = utils.removeObjectFields(schema, this.outerTypeName, !this.fieldNames ? () => true : fieldName => this.fieldNames.includes(fieldName));
const targetFieldConfigMap = utils.selectObjectFields(schema, this.outerTypeName, !this.fieldNames ? () => true : fieldName => this.fieldNames.includes(fieldName));
let wrapIndex = this.numWraps - 1;
let wrappingTypeName = this.wrappingTypeNames[wrapIndex];
let wrappingFieldName = this.wrappingFieldNames[wrapIndex];
newSchema = utils.appendObjectFields(newSchema, wrappingTypeName, targetFieldConfigMap);
let newSchema = utils.appendObjectFields(schema, wrappingTypeName, targetFieldConfigMap);
for (wrapIndex--; wrapIndex > -1; wrapIndex--) {

@@ -779,3 +779,4 @@ const nextWrappingTypeName = this.wrappingTypeNames[wrapIndex];

}
newSchema = utils.appendObjectFields(newSchema, this.outerTypeName, {
const selectedFieldNames = Object.keys(targetFieldConfigMap);
[newSchema] = utils.modifyObjectFields(newSchema, this.outerTypeName, fieldName => selectedFieldNames.includes(fieldName), {
[wrappingFieldName]: {

@@ -782,0 +783,0 @@ type: newSchema.getType(wrappingTypeName),

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';
import { applySchemaTransforms, getResponseKeyFromInfo, getErrors, mapSchema, MapperKind, relocatedError, hoistFieldNodes, removeObjectFields, appendObjectFields, wrapFieldNode, renameFieldNode, CombinedError } from '@graphql-tools/utils';
import { applySchemaTransforms, getResponseKeyFromInfo, getErrors, mapSchema, MapperKind, relocatedError, hoistFieldNodes, selectObjectFields, appendObjectFields, modifyObjectFields, wrapFieldNode, renameFieldNode, removeObjectFields, CombinedError } from '@graphql-tools/utils';
import { delegateToSchema, isSubschemaConfig, getSubschema, handleResult, defaultMergedResolver, createMergedResolver } from '@graphql-tools/delegate';

@@ -758,7 +758,7 @@ import { addResolversToSchema } from '@graphql-tools/schema';

transformSchema(schema) {
let [newSchema, targetFieldConfigMap] = removeObjectFields(schema, this.outerTypeName, !this.fieldNames ? () => true : fieldName => this.fieldNames.includes(fieldName));
const targetFieldConfigMap = selectObjectFields(schema, this.outerTypeName, !this.fieldNames ? () => true : fieldName => this.fieldNames.includes(fieldName));
let wrapIndex = this.numWraps - 1;
let wrappingTypeName = this.wrappingTypeNames[wrapIndex];
let wrappingFieldName = this.wrappingFieldNames[wrapIndex];
newSchema = appendObjectFields(newSchema, wrappingTypeName, targetFieldConfigMap);
let newSchema = appendObjectFields(schema, wrappingTypeName, targetFieldConfigMap);
for (wrapIndex--; wrapIndex > -1; wrapIndex--) {

@@ -775,3 +775,4 @@ const nextWrappingTypeName = this.wrappingTypeNames[wrapIndex];

}
newSchema = appendObjectFields(newSchema, this.outerTypeName, {
const selectedFieldNames = Object.keys(targetFieldConfigMap);
[newSchema] = modifyObjectFields(newSchema, this.outerTypeName, fieldName => selectedFieldNames.includes(fieldName), {
[wrappingFieldName]: {

@@ -778,0 +779,0 @@ type: newSchema.getType(wrappingTypeName),

{
"name": "@graphql-tools/wrap",
"version": "6.0.0-alpha-0bfc960.0",
"version": "6.0.0-alpha-23e0ae8.0",
"description": "A set of utils for faster development of GraphQL tools",

@@ -9,6 +9,6 @@ "peerDependencies": {

"dependencies": {
"@graphql-tools/delegate": "6.0.0-alpha-0bfc960.0",
"@graphql-tools/schema": "6.0.0-alpha-0bfc960.0",
"@graphql-tools/utils": "6.0.0-alpha-0bfc960.0",
"tslib": "1.11.1"
"@graphql-tools/delegate": "6.0.0-alpha-23e0ae8.0",
"@graphql-tools/schema": "6.0.0-alpha-23e0ae8.0",
"@graphql-tools/utils": "6.0.0-alpha-23e0ae8.0",
"tslib": "~2.0.0"
},

@@ -15,0 +15,0 @@ "repository": "git@github.com:ardatan/graphql-tools.git",

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