From 70460916901c08aec69a170467c1a1cb290e9fac Mon Sep 17 00:00:00 2001 From: Darrell Warde Date: Fri, 31 May 2024 15:44:01 +0100 Subject: [PATCH] Remove params from transaction metadata --- .changeset/cold-tables-trade.md | 5 ++++ packages/graphql/src/classes/Executor.ts | 30 +++++++++++------------- 2 files changed, 19 insertions(+), 16 deletions(-) create mode 100644 .changeset/cold-tables-trade.md diff --git a/.changeset/cold-tables-trade.md b/.changeset/cold-tables-trade.md new file mode 100644 index 0000000000..a8c69fee3f --- /dev/null +++ b/.changeset/cold-tables-trade.md @@ -0,0 +1,5 @@ +--- +"@neo4j/graphql": patch +--- + +Remove parameters from transaction metadata diff --git a/packages/graphql/src/classes/Executor.ts b/packages/graphql/src/classes/Executor.ts index d805f4d1b8..8c03f75417 100644 --- a/packages/graphql/src/classes/Executor.ts +++ b/packages/graphql/src/classes/Executor.ts @@ -17,35 +17,35 @@ * limitations under the License. */ +import Debug from "debug"; +import type { GraphQLResolveInfo } from "graphql"; +import { print } from "graphql"; import type { Driver, + ManagedTransaction, QueryResult, + Result, Session, + SessionConfig, SessionMode, Transaction, - SessionConfig, - ManagedTransaction, - Result, } from "neo4j-driver"; import { Neo4jError } from "neo4j-driver"; -import Debug from "debug"; -import environment from "../environment"; -import { - Neo4jGraphQLAuthenticationError, - Neo4jGraphQLConstraintValidationError, - Neo4jGraphQLForbiddenError, - Neo4jGraphQLRelationshipValidationError, -} from "./Error"; import { AUTH_FORBIDDEN_ERROR, AUTH_UNAUTHENTICATED_ERROR, DEBUG_EXECUTE, RELATIONSHIP_REQUIREMENT_PREFIX, } from "../constants"; -import type { CypherQueryOptions } from "../types"; -import type { GraphQLResolveInfo } from "graphql"; -import { print } from "graphql"; import { debugCypherAndParams } from "../debug/debug-cypher-and-params"; +import environment from "../environment"; +import type { CypherQueryOptions } from "../types"; +import { + Neo4jGraphQLAuthenticationError, + Neo4jGraphQLConstraintValidationError, + Neo4jGraphQLForbiddenError, + Neo4jGraphQLRelationshipValidationError, +} from "./Error"; const debug = Debug(DEBUG_EXECUTE); @@ -72,7 +72,6 @@ type TransactionConfig = { type: "system" | "user-direct" | "user-action" | "user-transpiled"; source?: { query: string; - params: Record; }; }; }; @@ -212,7 +211,6 @@ export class Executor { [Object.values(info.fragments).map((fragment) => print(fragment)), print(info.operation)].join( "\n\n" ), - params: info.variableValues, }; transactionConfig.metadata.source = source;