Skip to content

Commit 6dc90e9

Browse files
committed
Rename ignoreGeneratedLimit to disableGeneratedLimit
1 parent e0f35ca commit 6dc90e9

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

.changeset/orange-apes-ring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"@neo4j/graphql": patch
33
---
44

5-
Adds feature flag `cypherDirective.ignoreGeneratedLimit` to disable default limits to be applied on queries using `@cypher` directive
5+
Adds feature flag `cypherDirective.disableGeneratedLimit` to disable default limits to be applied on queries using `@cypher` directive

packages/graphql/src/translate/queryAST/factory/OperationFactory.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ export class OperationsFactory {
351351
const sort = this.sortAndPaginationFactory.createSortFields(sortOptions, entity, context);
352352
operation.addSort(...sort);
353353

354-
// We don't want to generate the limit operation on custom cypher fields if the flag "ignoreGeneratedLimit" is set
355-
if (operation instanceof CypherOperation && context.features.cypherDirective?.ignoreGeneratedLimit) {
354+
// We don't want to generate the limit operation on custom cypher fields if the flag "disableGeneratedLimit" is set
355+
if (operation instanceof CypherOperation && context.features.cypherDirective?.disableGeneratedLimit) {
356356
return operation;
357357
}
358358

packages/graphql/src/types/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ export type Neo4jFeaturesSettings = {
507507
/** Settings for the `@cypher` directive */
508508
cypherDirective?: {
509509
/** Enabling this setting, the limit generated by the directive `@limit` won't be added to fields with custom cypher */
510-
ignoreGeneratedLimit?: boolean;
510+
disableGeneratedLimit?: boolean;
511511
};
512512
};
513513

@@ -519,7 +519,7 @@ export type ContextFeatures = {
519519
subscriptions?: Neo4jGraphQLSubscriptionsEngine;
520520
unsafeEscapeOptions?: Neo4jFeaturesSettings["unsafeEscapeOptions"];
521521
cypherDirective?: {
522-
ignoreGeneratedLimit?: boolean;
522+
disableGeneratedLimit?: boolean;
523523
};
524524
};
525525

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import type { UniqueType } from "../../../../utils/graphql-types";
2121
import { TestHelper } from "../../../../utils/tests-helper";
2222

23-
describe("Cypher directive with limit ignoreGeneratedLimit flag", () => {
23+
describe("Cypher directive with limit disableGeneratedLimit flag", () => {
2424
const testHelper = new TestHelper();
2525
let typeDefs: string;
2626

@@ -69,7 +69,7 @@ describe("Cypher directive with limit ignoreGeneratedLimit flag", () => {
6969
typeDefs,
7070
features: {
7171
cypherDirective: {
72-
ignoreGeneratedLimit: true,
72+
disableGeneratedLimit: true,
7373
},
7474
},
7575
});

packages/graphql/tests/tck/directives/cypher/limit/cypher-with-ignore-limit.test.ts renamed to packages/graphql/tests/tck/directives/cypher/limit/cypher-with-disabled-limit.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import { Neo4jGraphQL } from "../../../../../src";
2121
import { formatCypher, formatParams, translateQuery } from "../../../utils/tck-test-utils";
2222

23-
describe("Cypher directive with limit and ignoreGeneratedLimit flag", () => {
23+
describe("Cypher directive with limit and disableGeneratedLimit flag", () => {
2424
const typeDefs = /* GraphQL */ `
2525
type Tag @limit(default: 10, max: 100) @node {
2626
id: Int
@@ -59,7 +59,7 @@ describe("Cypher directive with limit and ignoreGeneratedLimit flag", () => {
5959
typeDefs,
6060
features: {
6161
cypherDirective: {
62-
ignoreGeneratedLimit: true,
62+
disableGeneratedLimit: true,
6363
},
6464
},
6565
});

0 commit comments

Comments
 (0)