Releases: neo4j/graphql
@neo4j/graphql@7.0.0-alpha.7
Patch Changes
- #6180
eae9bb4
Thanks @angrykoala! - Revert dual package bundling. Publishing only cjs package
@neo4j/graphql@7.0.0-alpha.6
Major Changes
-
#6153
0779691
Thanks @angrykoala! - Fails schema validation if a field with@relationship
targets a type without@node
.For example, the following schema will fail:
type Movie @node { someActors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT) } type Actor { name: String }
-
#6158
19dc0dd
Thanks @angrykoala! - Remove optionCONNECT_OR_CREATE
from argumentnestedOperations
from@relationship
directives as it is no longer relevant afterconnectOrCreate
have been removed -
#6109
6801d70
Thanks @darrellwarde! - Thewhere
field for nested update operations has been moved within theupdate
input field.
Thewhere
in its previous location was a no-op for all nested operations apart fromupdate
.For example, the following syntax would filter the
Post
nodes to update in Version 6:mutation { updateUsers( where: { name: { eq: "Darrell" } } update: { posts: { where: { node: { title: { eq: "Version 7 Release Notes" } } } update: { node: { title: { set: "Version 7 Release Announcement" } } } } } ) }
In Version 7, this
where
has been moved 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" } } } } } ) }
-
#6124
d9cfd69
Thanks @angrykoala! - Fixed incorrect behavior ofsingle
andsome
filters on relationships to unions.Given the following union and relationship:
union Production = Movie | Series
and a relationship to this union:
type Actor @node { name: String! actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT) }
These queries previously returned incorrect results:
query { actors( where: { actedIn: { single: { Movie: { title_CONTAINS: "The Office" }, Series: { title_ENDS_WITH: "Office" } } } } ) { name } }
query { actors( where: { actedIn: { some: { Movie: { title_CONTAINS: "The Office" }, Series: { title_ENDS_WITH: "Office" } } } } ) { name } }
Previously, conditions inside single and some were evaluated separately for each concrete type in the union, requiring all to match. This was incorrect.
New behavior:
-
single
: Now correctly returns actors with exactly one related node across the whole union, rather than per type. -
some
: Now correctly returns actors with at least one matching related node of any type in the union.This fix also applies to the deprecated filters
actedIn_SINGLE
andactedIn_SOME
.
-
-
#6125
c51c9c0
Thanks @angrykoala! - Does not generate queries for interfaces without an implementing type with the@node
directive.For example. The following type definitions:
interface Production { title: String! } type Movie @node { title: String! } type NotANode implements Production { title: String! }
Will no longer generate the queries and types related to the interface
Production
:type Query { productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! productionsConnection( after: String first: Int sort: [ProductionSort!] where: ProductionWhere ): ProductionsConnection! }
-
#6152
3e642d9
Thanks @darrellwarde! - The@query
directive used on the schema will now also apply to the generation of queries for interface and union types.The following type definitions will not produce query fields for the
Production
orMedia
types.interface Production { title: String! } type Movie implements Production @node { title: String! } type Series implements Production @node { title: String! } union Media = Movie | Series extend schema @query(read: false, aggregate: false)
-
#6159
2adfdec
Thanks @angrykoala! - Fails schema validation if an interface is implemented by a type with@node
but not all implemented types use@node
. For example, the following is invalid:interface Person { name: String } type Director implements Person { name: String } type Actor implements Person @node { name: String }
-
#6165
992c53a
Thanks @angrykoala! - Fails schema validation if an union is composed of a type with@node
but not all other types. For example, the following is invalid:union Person = Director | Actor type Director { name: String } type Actor @node { name: String }
Minor Changes
- #6178
7aa1b95
Thanks @darrellwarde! - The Neo4j GraphQL Library is now bundled as a dual package containing both CommonJS and ESM builds. This is a changelog entry for #6177.
Patch Changes
- #6154
5fedc91
Thanks @MacondoExpress! - Fixed a bug that allowed thequeryName
andfields
arguments of the@fulltext
directive to be undefined.
@neo4j/graphql@6.6.0
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/graphql@6.5.3
@neo4j/graphql@5.12.1
@neo4j/graphql-ogm@5.12.1
Patch Changes
- Updated dependencies [
11952fd
]:- @neo4j/graphql@5.12.1
@neo4j/graphql@7.0.0-alpha.5
@neo4j/graphql@6.5.2
Patch Changes
- #6081
90d9b58
Thanks @angrykoala! - Fix missing authentication rules for interfaces in aggregate fields in connections.
@neo4j/graphql-amqp-subscriptions-engine@2.0.1
Patch Changes
- #6082
3587922
Thanks @angrykoala! - Update types of amqplib
@neo4j/graphql@7.0.0-alpha.4
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