Skip to content

Conversation

@angrykoala
Copy link
Member

@angrykoala angrykoala commented Dec 10, 2025

Description

Support for using @cypher directives in relationship properties

The following will not be supported:

  • Aggregate by @cypher fields (both, in edge and node)

Example:

type Movie @node {
    title: String!
    actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn")
}

type Actor @node {
    name: String!
    actedIn: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn")
}

type ActedIn @relationshipProperties {
    screenTimeHours: Float
        @cypher(
            statement: """
            RETURN this.screenTimeMinutes / 60 AS c
            """
            columnName: "c"
        )
    screenTimeMinutes: Int
}

@angrykoala angrykoala linked an issue Dec 10, 2025 that may be closed by this pull request
@changeset-bot
Copy link

changeset-bot bot commented Dec 10, 2025

🦋 Changeset detected

Latest commit: 9fb31f6

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 Dec 18, 2025

Performance Report

No Performance Changes

Show Full Table
name dbHits old dbHits time (ms) old time (ms) maxRows
aggregations.TopLevelAggregateWithMultipleFields 7936 7936 57 79 1134
aggregations.NestedAggregation 15407 15407 59 98 2174
aggregations.AggregationWithWhere 10833 10833 45 79 2174
aggregations.AggregationWhereWithinNestedRelationships 20097917 20097917 1933 1995 2008534
aggregations.AggregationWhereWithinNestedConnections 20097917 20097917 1913 1972 2008534
aggregations.InterfacesAggregations 8324 8324 98 118 2080
aggregations.InterfacesAggregationsWithTwoFields 13526 13526 128 150 2080
connections.Connection 12951 12951 65 100 2174
connections.NestedConnection 37705 37705 133 134 4516
connections.totalCount 1 1 26 41 1
cypher-directive-mutation.TopLevelMutationDirective 1135 1135 47 64 1134
cypher-directive.TopLevelSortWithCypher 12961 12961 40 52 2174
cypher-directive.TopLevelConnectionSortWithCypher 12961 12961 59 76 2174
cypher-directive.TopLevelSortWithCypherWithNested 13096 13096 59 79 2174
cypher-directive.TopLevelConnectionSortWithCypherWithNested 13096 13096 89 110 2174
cypher-directive.TopLevelSortWithExpensiveCypher 13725 13735 99 146 2174
cypher-directive.TopLevelConnectionSortWithExpensiveCypher 13266 13266 103 126 2174
fulltext.Fulltext 80 80 49 60 16
fulltext.FulltextWithNestedQuery 516 516 64 97 84
1262.NestedConnectionWhere 8703 8703 59 88 2174
187.QueryWhere 8564 8624 35 57 2154
2871.NestedRelationshipFilter 19632 19832 57 73 4395
batch-create.BatchCreate 3600 3600 92 107 600
connect.createAndConnect 4410 4410 47 64 1134
create.SimpleMutation 6 6 36 40 1
delete.SimpleDelete 19401 19401 617 632 1040
delete.NestedDeleteInUpdate 14688 14688 111 173 1179
update.NestedUpdate 10129 10129 60 86 2002
query.SimpleQuery 3121 3121 20 22 1040
query.SimpleQueryWithRelationship 15031 15031 42 46 2174
query.SimpleQueryWithNestedWhere 8713 8713 48 73 2154
query.Nested 3988 3988 78 92 1040
query.OrFilterOnRelationships 36736 36538 156 226 1957
query.OrFilterOnRelationshipsAndNested 26725 26573 192 245 1957
query.QueryWithNestedIn 14198 14207 54 62 1866
query.DeeplyNestedConnectionWhere 8702 8702 69 90 2174
query.DeeplyNestedWithRelationshipFilters 17357 17357 125 176 1552
query.NestedWithRelationshipSingleFilters 3808 3808 146 200 1134
sorting.SortMultipleTypes 3436 3436 74 85 1040
sorting.SortMultipleTypesWithCypherWithCypher 13321 13321 112 108 2174
sorting.SortOnNestedFields 12951 12951 55 58 2174
sorting.SortDeeplyNestedFields 39785 39785 110 111 4516
sorting.ConnectionWithSort 3271 3271 68 76 1040
unions.SimpleUnionQuery 321 321 54 68 35
unions.SimpleUnionQueryWithMissingFields 293 293 57 65 35
unions.NestedUnion 309975 309975 250 289 33033
unions.NestedUnionWithMissingFields 283949 283949 240 273 33033

Old Schema Generation: 22.147s
Schema Generation: 21.331s
Old Subgraph Schema Generation: 26.022s
Subgraph Schema Generation: 25.455s

@angrykoala angrykoala marked this pull request as ready for review December 18, 2025 12:23
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.

@cypher on relationship fields

3 participants