Skip to content
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

add new flag: addCypherVersion #5952

Merged
merged 6 commits into from
Jan 28, 2025
Merged

add new flag: addCypherVersion #5952

merged 6 commits into from
Jan 28, 2025

Conversation

angrykoala
Copy link
Member

Description

Add feature flag "addCypherVersion":

neoSchema = new Neo4jGraphQL({
    typeDefs,
    features: {
        addCypherVersion: true,
    },
});

This prepends all Cypher queries with a CYPHER [version] statement:

CYPHER 5
MATCH (this:Movie)
WHERE this.title = $param0
RETURN this { .title } AS this

Copy link

changeset-bot bot commented Jan 24, 2025

🦋 Changeset detected

Latest commit: c1f163b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@neo4j/graphql Patch

Not sure what this means? Click here to learn what changesets are.

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

@neo4j-team-graphql
Copy link
Collaborator

neo4j-team-graphql commented Jan 24, 2025

Performance Report

No Performance Changes

Show Full Table
name dbHits old dbHits time (ms) old time (ms) maxRows
aggregations.TopLevelAggregate 3404 3404 42 57 1134
aggregations.TopLevelAggregateWithMultipleFields 6802 6802 51 78 1134
aggregations.NestedAggregation 15407 15407 65 88 2174
aggregations.AggregationWithWhere 10833 10833 43 58 2174
aggregations.AggregationWhereWithinNestedRelationships 20097917 20097917 2050 2159 2008534
aggregations.AggregationWhereWithinNestedConnections 20097917 20097917 2019 2054 2008534
aggregations.NestedCountFromMovieToActors 8603 8603 35 45 2174
aggregations.NestedCountFromActorsToMovie 8791 8791 39 47 2174
aggregations.DeeplyNestedCount 10052335 10052335 2615 2375 2008534
aggregations.InterfacesAggregations 6242 6242 54 66 2080
aggregations.InterfacesAggregationsWithTwoFields 11444 11444 83 110 2080
batch-create.BatchCreate 4200 4200 123 170 600
batch-create.BatchCreateSmall 77 77 55 76 11
connect.createAndConnect 6433 6433 132 204 3003
connections.Connection 12951 12951 62 79 2174
connections.NestedConnection 37705 37705 150 154 4516
create.SimpleMutation 7 7 65 75 1
cypher-directive.TopLevelMutationDirective 1135 1135 25 31 1134
delete.SimpleDelete 19401 19401 660 689 1040
2925.SingleRelationshipFilter 5245 5245 40 50 1040
2925.SingleRelationshipRequiredFilter 5201 5201 38 43 1040
query.SimpleQuery 3121 3121 22 27 1040
query.SimpleQueryWithRelationship 15031 15031 41 50 2174
query.SimpleQueryWithNestedWhere 8713 8713 50 63 2154
query.Nested 10084891 10084891 6618 6354 2008534
query.NestedWithFilter 10064992 10064992 6405 6357 2004000
query.OrFilterOnRelationships 36946 36712 160 195 2027
query.QueryWithNestedIn 14468 14468 59 74 1956
query.NestedConnectionWhere 8703 8703 56 75 2174
query.DeeplyNestedConnectionWhere 8702 8702 78 105 2174
query.DeeplyNestedWithRelationshipFilters 17357 17357 129 200 1552
query.NestedWithRelationshipSingleFilters 3808 3808 152 221 1134
query.Fulltext 64 64 57 40 16
query.FulltextWithNestedQuery 516 516 50 53 84
sorting-and-cypher.TopLevelSortWithCypher 12961 12961 50 52 2174
sorting-and-cypher.TopLevelConnectionSortWithCypher 12961 12961 88 72 2174
sorting-and-cypher.TopLevelSortWithCypherWithNested 13096 13096 67 84 2174
sorting-and-cypher.TopLevelConnectionSortWithCypherWithNested 13096 13096 109 123 2174
sorting-and-cypher.TopLevelSortWithExpensiveCypher 13720 13720 163 150 2174
sorting-and-cypher.TopLevelConnectionSortWithExpensiveCypher 13266 13266 119 132 2174
sorting.SortMultipleTypes 3436 3436 93 101 1040
sorting.SortMultipleTypesWithCypherWithCypher 13321 13321 109 116 2174
sorting.SortOnNestedFields 12951 12951 50 51 2174
sorting.SortDeeplyNestedFields 39785 39785 86 105 4516
sorting.ConnectionWithSort 3271 3271 80 100 1040
unions.SimpleUnionQuery 321 321 60 87 35
unions.SimpleUnionQueryWithMissingFields 293 293 58 66 35
unions.NestedUnion 309975 309975 271 292 33033
unions.NestedUnionWithMissingFields 283949 283949 260 284 33033
update.NestedUpdate 14137 14137 94 129 2002

Old Schema Generation: 29.424s
Schema Generation: 29.558s
Old Subgraph Schema Generation: 30.311s
Subgraph Schema Generation: 30.268s

```js
{
cypherQueryOptions: {
addCypherVersionPrefix: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this just addVersionPrefix? Kind of implied it's Cypher version given it's in cypherQueryOptions.

@angrykoala angrykoala merged commit 5d9d9d5 into dev Jan 28, 2025
40 checks passed
@angrykoala angrykoala deleted the addCypherVersion branch January 28, 2025 15:35
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.

3 participants