Migration to 5.0.0
This page lists all breaking changes from the Neo4j GraphQL Library version 4.x to 5.x and how to update it.
How to update
To update your Neo4j GraphQL Library, use npm or the package manager of choice:
npm update @neo4j/graphql
Breaking changes
Here is a list of all the breaking changes from version 4.0.0 to 5.0.0.
@relationshipProperties
The directive @relationshipProperties
should now be used on types rather than interfaces.
For example:
Before | Now |
---|---|
|
|
Interface directives
To better match the default behavior of GraphQL, library directives used in interfaces will not cascade to the implementing types anymore. This means that most directives are no longer valid in interfaces and have to be defined in the implementing types. This also applies to custom directives.
@declareRelationship
The @relationship
directive is no longer available in interfaces.
If you need a relationship to be available on interfaces, you need to use the new @declareRelationship
directive instead, as well as define the relationships in the concrete type.
This change is due to directives no longer cascading from interfaces to types. However, now it is possible for a relationship to have different properties and labels in each type. For example:
Before |
Now |
|
|
Edge properties
Edge properties in connections now exist within the field properties
in edges
:
Before |
Now |
|
|
_on
filters deprecated
_on
filters for interfaces are no longer available in where
and mutations. To filter by an implementing type, you need to use the new filter typename_IN
:
Before |
Now |
|
|
Using fields of a type in an interface operation is no longer supported. |