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
2
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.3 to 0.1.4

3

lib/src/graphql.d.ts
import { DocumentNode } from 'graphql';
import { DirectiveInfo } from './directives';
export declare type Resolver = (fieldName: string, rootValue: any, args: any, context: any, info: ExecInfo) => any;
import { TransformDocumentOptions } from 'graphql-ast-tools';
export declare type VariableMap = {

@@ -27,2 +28,2 @@ [name: string]: any;

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

@@ -15,4 +15,5 @@ "use strict";

var graphql_ast_tools_1 = require("graphql-ast-tools");
function graphql(resolver, document, rootValue, contextValue, variableValues, execOptions) {
function graphql(resolver, document, rootValue, contextValue, variableValues, execOptions, transformOptions) {
if (execOptions === void 0) { execOptions = {}; }
if (transformOptions === void 0) { transformOptions = {}; }
var resultMapper = execOptions.resultMapper;

@@ -27,5 +28,3 @@ var fragmentMatcher = execOptions.fragmentMatcher || (function () { return true; });

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

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

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

@@ -62,4 +62,4 @@ "main": "./lib/src/index.js",

"dependencies": {
"graphql-ast-tools": "^0.1.6"
"graphql-ast-tools": "^0.2.1"
}
}

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

import {
TransformDocumentOptions,
transformDocument,

@@ -83,2 +84,3 @@ mergeSelectionSets,

execOptions: ExecOptions = {},
transformOptions: TransformDocumentOptions = {},
) {

@@ -100,2 +102,3 @@ const resultMapper = execOptions.resultMapper;

const resolved = transformDocument(document, {
...transformOptions,
variables: variableValues || {},

@@ -102,0 +105,0 @@ });

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