@coralproject/graphql-anywhere-optimized
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -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
71003
1
32
1031
+ Addedgraphql-ast-tools@^0.1.3
+ Added@wry/equality@0.1.11(transitive)
+ Addedapollo-utilities@1.3.4(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedgraphql@15.10.1(transitive)
+ Addedgraphql-ast-tools@0.1.6(transitive)
+ Addedts-invariant@0.4.4(transitive)
+ Addedtslib@1.14.1(transitive)