graphql-jit
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -27,2 +27,3 @@ "use strict"; | ||
const GLOBAL_INSPECT_NAME = "__inspect"; | ||
const GLOBAL_PARENT_NAME = "__parent"; | ||
/** | ||
@@ -220,3 +221,3 @@ * It compiles a GraphQL query to an executable function | ||
const subContext = createSubCompilationContext(context); | ||
const nodeBody = compileType(subContext, parentType, fieldType, fieldNodes, [fieldName], [`parent.${name}`], responsePath); | ||
const nodeBody = compileType(subContext, parentType, fieldType, fieldNodes, [fieldName], [`${GLOBAL_PARENT_NAME}.${name}`], responsePath); | ||
const resolverName = getResolverName(parentType.name, fieldName); | ||
@@ -234,3 +235,3 @@ const topLevelArgs = getArgumentsVarName(resolverName); | ||
${getExecutionInfo(subContext, parentType, fieldType, fieldName, fieldNodes, responsePath)}), | ||
(parent, ${fieldName}, err) => { | ||
(${GLOBAL_PARENT_NAME}, ${fieldName}, err) => { | ||
if (err != null) { | ||
@@ -242,3 +243,3 @@ ${graphql_1.isNonNullType(fieldType) | ||
${generateUniqueDeclarations(subContext)} | ||
parent.${name} = ${nodeBody};\n | ||
${GLOBAL_PARENT_NAME}.${name} = ${nodeBody};\n | ||
${compileDeferredFields(subContext)} | ||
@@ -245,0 +246,0 @@ },${destinationPaths.join(".")}, ${GLOBAL_DATA_NAME}, ${GLOBAL_ERRORS_NAME}, ${GLOBAL_NULL_ERRORS_NAME}) |
{ | ||
"name": "graphql-jit", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "GraphQL JIT Compiler to JS", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
181499
2687