Skip to content

Migrate new translation layer to use apoc.util.validate instead of apoc.util.validatePredicate #6378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

MacondoExpress
Copy link
Contributor

@MacondoExpress MacondoExpress commented Jun 6, 2025

This PR changes how the AuthorizationFilters class is implemented.
The validation rules are now backed by the procedure apoc.util.validate and executed as a separate procedure call.
The AuthorizationFilters class contract is changed to support the new method .getValidation

List of changes:

  • Deprecated the AuthorizationFilters class that now is available as AuthorizationFiltersDeprecated and only to be used in the legacy translation resolvers.
  • Deprecated the AuthorizationFactory class that is available as AuthorizationFactoryDeprecated and is only to be used in the legacy translation resolver.
  • Unskipped test "authorization should be executed only for movies with ratings lower than 7" at: tests/integration/directives/cypher/filtering/relationships/cypher-filtering-relationship-auth.int.test.ts

Copy link

changeset-bot bot commented Jun 6, 2025

⚠️ No Changeset found

Latest commit: a89025e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@neo4j-team-graphql
Copy link
Collaborator

neo4j-team-graphql commented Jun 6, 2025

Performance Report

No Performance Changes

Show Full Table
name dbHits old dbHits time (ms) old time (ms) maxRows
aggregations.TopLevelAggregateWithMultipleFields 7936 7936 58 69 1134
aggregations.NestedAggregation 15407 15407 70 111 2174
aggregations.AggregationWithWhere 10833 10833 49 78 2174
aggregations.AggregationWhereWithinNestedRelationships 20097917 20097917 1991 2079 2008534
aggregations.AggregationWhereWithinNestedConnections 20097917 20097917 1975 2043 2008534
aggregations.InterfacesAggregations 8324 8324 99 134 2080
aggregations.InterfacesAggregationsWithTwoFields 13526 13526 124 140 2080
connections.Connection 12951 12951 82 77 2174
connections.NestedConnection 37705 37705 123 153 4516
cypher-directive-mutation.TopLevelMutationDirective 1135 1135 27 29 1134
cypher-directive.TopLevelSortWithCypher 12961 12961 41 49 2174
cypher-directive.TopLevelConnectionSortWithCypher 12961 12961 60 77 2174
cypher-directive.TopLevelSortWithCypherWithNested 13096 13096 57 75 2174
cypher-directive.TopLevelConnectionSortWithCypherWithNested 13096 13096 100 122 2174
cypher-directive.TopLevelSortWithExpensiveCypher 13725 13725 95 152 2174
cypher-directive.TopLevelConnectionSortWithExpensiveCypher 13266 13266 99 176 2174
fulltext.Fulltext 80 80 44 71 16
fulltext.FulltextWithNestedQuery 516 516 62 81 84
1262.NestedConnectionWhere 8703 8703 51 78 2174
187.QueryWhere 8564 8564 37 42 2154
2871.NestedRelationshipFilter 19632 19632 51 64 4395
batch-create.BatchCreate 3600 3600 87 97 600
connect.createAndConnect 4411 4411 92 105 1134
create.SimpleMutation 6 6 28 35 1
delete.SimpleDelete 19401 19401 669 670 1040
delete.NestedDeleteInUpdate 14688 14688 107 145 1179
update.NestedUpdate 10129 10129 58 68 2002
query.SimpleQuery 3121 3121 21 26 1040
query.SimpleQueryWithRelationship 15031 15031 42 50 2174
query.SimpleQueryWithNestedWhere 8713 8713 51 56 2154
query.Nested 3988 3988 76 88 1040
query.OrFilterOnRelationships 36730 36496 170 164 1955
query.OrFilterOnRelationshipsAndNested 26719 26531 210 229 1955
query.QueryWithNestedIn 14192 14189 67 67 1864
query.DeeplyNestedConnectionWhere 8702 8702 77 108 2174
query.DeeplyNestedWithRelationshipFilters 17357 17357 142 166 1552
query.NestedWithRelationshipSingleFilters 3808 3808 146 217 1134
sorting.SortMultipleTypes 3436 3436 83 106 1040
sorting.SortMultipleTypesWithCypherWithCypher 13321 13321 108 115 2174
sorting.SortOnNestedFields 12951 12951 44 57 2174
sorting.SortDeeplyNestedFields 39785 39785 83 122 4516
sorting.ConnectionWithSort 3271 3271 82 82 1040
unions.SimpleUnionQuery 321 321 68 69 35
unions.SimpleUnionQueryWithMissingFields 293 293 68 63 35
unions.NestedUnion 309975 309975 277 283 33033
unions.NestedUnionWithMissingFields 283949 283949 258 260 33033

Old Schema Generation: 27.693s
Schema Generation: 27.910s
Old Subgraph Schema Generation: 28.924s
Subgraph Schema Generation: 29.504s

@MacondoExpress MacondoExpress merged commit d24843b into neo4j:dev Jun 9, 2025
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants