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

@coralproject/graphql-anywhere-optimized

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coralproject/graphql-anywhere-optimized - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

1

lib/src/graphql.d.ts

@@ -27,3 +27,4 @@ import { DocumentNode } from 'graphql';

fragmentMatcher?: FragmentMatcher;
includeAll?: boolean;
};
export declare function graphql(resolver: Resolver, document: DocumentNode, rootValue?: any, contextValue?: any, variableValues?: VariableMap, execOptions?: ExecOptions, transformOptions?: TransformDocumentOptions): any;

6

lib/src/graphql.js

@@ -20,5 +20,7 @@ "use strict";

var fragmentMatcher = execOptions.fragmentMatcher || (function () { return true; });
var includeAll = !!execOptions.includeAll;
var variables = variableValues || {};
var execContext = {
contextValue: contextValue,
variableValues: variableValues,
variableValues: variables,
resultMapper: resultMapper,

@@ -28,3 +30,3 @@ resolver: resolver,

};
var resolved = graphql_ast_tools_1.transformDocument(document, __assign({}, transformOptions, { variables: variableValues || {} }));
var resolved = graphql_ast_tools_1.transformDocument(document, __assign({}, transformOptions, { variables: includeAll ? undefined : variables }));
var mainDefinition = getFromAST_1.getMainDefinition(resolved);

@@ -31,0 +33,0 @@ return executeSelectionSet(mainDefinition.selectionSet, rootValue, execContext);

{
"name": "@coralproject/graphql-anywhere-optimized",
"version": "0.1.5",
"version": "0.1.6",
"description": "Fork of graphql-anywhere with custom optimizations",

@@ -5,0 +5,0 @@ "main": "./lib/src/index.js",

@@ -18,3 +18,2 @@ import {

DirectiveInfo,
shouldInclude,
getDirectiveInfoFromField,

@@ -46,3 +45,3 @@ } from './directives';

export type ResultMapper = (values: {[fieldName: string]: any}, rootValue: any) => any;
export type ResultMapper = (values: { [fieldName: string]: any }, rootValue: any) => any;
export type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean;

@@ -67,2 +66,3 @@

fragmentMatcher?: FragmentMatcher;
includeAll?: boolean;
};

@@ -93,5 +93,11 @@

// If set ignore skip and if directives.
const includeAll = !!execOptions.includeAll;
// Default to {} when passing in falsy values.
const variables = variableValues || {};
const execContext: ExecContext = {
contextValue,
variableValues,
variableValues: variables,
resultMapper,

@@ -105,3 +111,4 @@ resolver,

...transformOptions,
variables: variableValues || {},
// Passing variables will resolve @skip and @include directives.
variables: includeAll ? undefined : variables,
});

@@ -245,2 +252,1 @@

}

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