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.0 to 0.1.1

12

lib/src/graphql.js

@@ -14,3 +14,3 @@ "use strict";

var storeUtils_1 = require("./storeUtils");
var astTools_1 = require("./astTools");
var graphql_ast_tools_1 = require("graphql-ast-tools");
function graphql(resolver, document, rootValue, contextValue, variableValues, execOptions) {

@@ -27,8 +27,4 @@ if (execOptions === void 0) { execOptions = {}; }

};
var resolved = astTools_1.resolveNamedFragmentsAndDirectives(document, {
fragmentMatcher: function (idValue, typeCondition) {
return fragmentMatcher(idValue, typeCondition, contextValue);
},
variables: variableValues,
rootValue: rootValue,
var resolved = graphql_ast_tools_1.transformDocument(document, {
variables: variableValues || {},
});

@@ -48,3 +44,3 @@ var mainDefinition = getFromAST_1.getMainDefinition(resolved);

if (execContext.fragmentMatcher(rootValue, typeCondition, contextValue)) {
resolvedSelectionSet_1 = astTools_1.mergeSelectionSets(resolvedSelectionSet_1, fragment.selectionSet);
resolvedSelectionSet_1 = graphql_ast_tools_1.mergeSelectionSets(resolvedSelectionSet_1, fragment.selectionSet);
}

@@ -51,0 +47,0 @@ });

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

@@ -60,3 +60,6 @@ "main": "./lib/src/index.js",

"typescript": "^2.2.1"
},
"dependencies": {
"graphql-ast-tools": "^0.1.3"
}
}

@@ -29,7 +29,2 @@ import {

import {
resolveNamedFragmentsAndDirectives,
mergeSelectionSets,
} from './astTools';
export type Resolver = (

@@ -43,2 +38,7 @@ fieldName: string,

import {
transformDocument,
mergeSelectionSets,
} from 'graphql-ast-tools';
export type VariableMap = { [name: string]: any };

@@ -98,7 +98,5 @@

const resolved = resolveNamedFragmentsAndDirectives(document, {
fragmentMatcher: (idValue, typeCondition) =>
fragmentMatcher(idValue, typeCondition, contextValue),
variables: variableValues,
rootValue,
// Resolve named fragments
const resolved = transformDocument(document, {
variables: variableValues || {},
});

@@ -105,0 +103,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