Releases: neo4j/graphql
@neo4j/[email protected]
Minor Changes
-
#6110
100a603
Thanks @darrellwarde! - Thewhere
field for nested update operations has been deprecated to be moved within theupdate
input field.
Thewhere
in its deprecated location is a no-op for all nested operations apart fromupdate
.For example, the following mutation is using the deprecated syntax:
mutation { updateUsers( where: { name: { eq: "Darrell" } } update: { posts: { where: { node: { title: { eq: "Version 7 Release Notes" } } } update: { node: { title: { set: "Version 7 Release Announcement" } } } } } ) }
It should be modified to move the
where
inside theupdate
operation:mutation { updateUsers( where: { name: { eq: "Darrell" } } update: { posts: { update: { where: { node: { title: { eq: "Version 7 Release Notes" } } } node: { title: { set: "Version 7 Release Announcement" } } } } } ) }
Patch Changes
- #6126
7af4bbd
Thanks @angrykoala! - AddoverwriteArgument
option toexcludeDeprecatedFields
to remove the argumentoverwrite
from connect operations
@neo4j/[email protected]
@neo4j/[email protected]
@neo4j/[email protected]
Patch Changes
- Updated dependencies [
11952fd
]:- @neo4j/graphql@5.12.1
@neo4j/[email protected]
@neo4j/[email protected]
Patch Changes
- #6081
90d9b58
Thanks @angrykoala! - Fix missing authentication rules for interfaces in aggregate fields in connections.
@neo4j/[email protected]
Patch Changes
- #6082
3587922
Thanks @angrykoala! - Update types of amqplib
@neo4j/[email protected]
Major Changes
-
#6048
c667618
Thanks @darrellwarde! - Subscriptions are now an opt-in feature which can be enabled by using the@subscription
directive on either schema or type.For example, to enable subscriptions for the whole schema (equivalent to before this breaking change):
type Movie @node { title: String! } extend schema @subscription
To enable subscriptions just for the
Movie
type:type Movie @node @subscription { title: String! }
-
#6077
4cf7c07
Thanks @darrellwarde! - Values specified within the@coalesce
directive are now also returned when selecting those fields, and not just when those fields are used in a filter. -
#6027
fd7d373
Thanks @angrykoala! - Remove deprecated fields*aggregate
in favor of theaggregate
field in connections. Remove optiondeprecatedAggregateOperations
from theexcludeDeprecatedFields
setting.
Minor Changes
-
#6024
2318336
Thanks @MacondoExpress! - Aggregations filters are moved to the connection input field.Current aggregation filters:
{ posts(where: { likesConnection: { aggregate: { node: { someInt: { average: { eq: 10 } } } } } }) { content } }
Deprecated aggregation filters:
{ posts(where: { likesAggregate: { node: { someInt: { average: { eq: 10 } } } } }) { content } }
-
#6024
2318336
Thanks @MacondoExpress! - The aggregation filtercount
now supports both, nodes and relationships.Count filter on nodes:
{ posts(where: { likesConnection: { aggregate: { count: { nodes: { eq: 2 } } } } }) { title likes { name } } }
Count filter on edges:
{ posts(where: { likesConnection: { aggregate: { count: { edges: { eq: 2 } } } } }) { title likes { name } } }
Patch Changes
-
#6024
667e75c
Thanks @MacondoExpress! - Following the changes of moving aggregations inside the connection fields,
the previous aggregations filters outside the connection filters are now deprecated.The flag
aggregationFiltersOutsideConnection
has been added to the excludeDeprecatedFields setting.const neoSchema = new Neo4jGraphQL({ typeDefs, features: { excludeDeprecatedFields: { aggregationFiltersOutsideConnection: true } }, });
-
#6000
271a0a3
Thanks @MacondoExpress! - AddaddVersionPrefix
tocypherQueryOptions
in context to add a Cypher version withCYPHER
before each query:{ cypherQueryOptions: { addVersionPrefix: 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
@neo4j/[email protected]
Patch Changes
-
#6079
7e9a0bd
Thanks @angrykoala! - Fix edge filtering for aggregate fields inside connections.Previously, the following query would aggregate all the movies named The Matrix, ignoring the edge filter
query { actors { moviesConnection(where: { edge: { screentime_EQ: 19 }, node: { title_EQ: "The Matrix" } }) { aggregate { node { title { longest } } } } } }
@neo4j/[email protected]
Minor Changes
-
#6003
2952820
Thanks @angrykoala! - Add count fields in aggregations with support for nodes and edges count:query { moviesConnection { aggregate { count { nodes } } } }
query { movies { actorsConnection { aggregate { count { nodes edges } } } } }
-
#5944
a6e9486
Thanks @angrykoala! - Add aggregate field in connection:query { moviesConnection { aggregate { node { count int { longest } } } } }
Patch Changes
-
#5999
47f915e
Thanks @angrykoala! - Deprecate aggregation fields (e.gactedInAggregate
) in favor of the fieldaggregate
inside the connection (e.gactedInConnection -> aggregate
) -
#5944
a6e9486
Thanks @angrykoala! - Deprecate old aggregate operations:query { moviesAggregate { count rating { min } } }
These fields can be completely removed from the schema with the new flag
deprecatedAggregateOperations
:const neoSchema = new Neo4jGraphQL({ typeDefs, features: { excludeDeprecatedFields: { deprecatedAggregateOperations: true } }, });