diff --git a/modules/ROOT/pages/migration/index.adoc b/modules/ROOT/pages/migration/index.adoc index 40bb46a5..6fcd4748 100644 --- a/modules/ROOT/pages/migration/index.adoc +++ b/modules/ROOT/pages/migration/index.adoc @@ -312,9 +312,10 @@ The following fields have been added: - `implicitEqualFilters` - `deprecatedOptionsArgument` - `directedArgument` - - `directedArgument` - `connectOrCreate` - `typename_IN` + - `implicitSet` + - `idAggregations` === Removed some `@cypher` fields from the sort argument @@ -328,71 +329,16 @@ The following `@cypher` field types have been removed from the `sort` argument b Following the deprecation of the link:https://neo4j.com/docs/cypher-manual/current/planning-and-tuning/query-tuning/#cypher-connect-components-planner[`connectComponentsPlanner`], the field is no longer accepted in the GraphQL context and is removed from the `cypherQueryOptions` object. -== Additions - -=== Added the `_EQ` filter as an alternative to the deprecated implicit equal filters - -The `count_EQ` filter is now available as an alternative to the deprecated `count` filter. +=== Removed support for the Object Graph Mapper (OGM) -[cols="1,1"] -|=== -|Before | Now - -a| -[source, graphql, indent=0] ----- -{ - movies(where: { actorsAggregate: { count: 10 } }) { - title - } -} ----- -a| -[source, graphql, indent=0] ----- -{ - movies(where: { actorsAggregate: { count_EQ: 10 } }) { - title - } -} ----- -|=== - -=== Added the `_EQ` filter as an alternative to the deprecated implicit "equal" filter - -The `_EQ` filter is now available as an alternative to the deprecated implicit "equal" filter. - -[cols="1,1"] -|=== -|Before | Now - -a| -[source, graphql, indent=0] ----- -{ - movies(where: { title: "The Matrix" }) { - title - } -} +The OGM is discontinued with version 6.0.0 of the GraphQL Library. +Version 5 (LTS) is the last version to feature the link:{neo4j-docs-base-uri}/graphql/5/ogm[OGM]. ----- -a| -[source, graphql, indent=0] ----- -{ - movies(where: { title_EQ: "The Matrix" }) { - title - } -} ----- -|=== == Deprecations and warnings -=== Removed the Object Graph Mapper (OGM) +Here is a list of deprecations and warnings from version 5.0.0 to 6.0.0. -The OGM is discontinued with version 6.0.0 of the GraphQL Library. -Version 5 (LTS) is the last version to feature the link:{neo4j-docs-base-uri}/graphql/5/ogm[OGM]. === Implicit equality filters are deprecated @@ -402,7 +348,7 @@ The following implicit equality filters are deprecated: - `{ count: 10 }` You can achieve the same by using `{ name_EQ: "Keanu" }` and `{ count_EQ: 10 }`. -The deprecated quality filters will be removed in version 7.x. +The deprecated quality filters will be removed in version 7. [cols="1,1"] |=== @@ -430,6 +376,19 @@ query { ---- |=== +The `_EQ_` filters can be disabled from the generated schema with the option `implicitEqualFilters` set to `true`: + +[source, javascript] +---- +new Neo4jGraphQL({ + features: { + excludeDeprecatedFields: { + implicitEqualFilters: true + } + } +}) +---- + === `@node` will have to be explicitly defined In the future, types without the `@node` directive will no longer be treated as Neo4j nodes. @@ -466,36 +425,6 @@ type Person @node { ---- |=== -=== Deprecated the implicit equality filters - -Previously, if a field was present in a filter without specifying the operator, it was treated as an equality filter. -This behavior is now deprecated and will be removed in the future. -Use the `_EQ` filter instead. - -[cols="1,1"] -|=== -|Before | Now - -a| -[source, graphql, indent=0] ----- -{ - movies(where: { title: "The Matrix" }) { - title - } -} ----- -a| -[source, graphql, indent=0] ----- -{ - movies(where: { title_EQ: "The Matrix" }) { - title - } -} ----- -|=== - === Deprecated pagination `options` argument The `options` argument in query and `@relationship` fields is deprecated and will be removed in the future. @@ -525,6 +454,19 @@ a| ---- |=== +The `options` argument can be disabled from the generated schema with the option `deprecatedOptionsArgument` set to `true`: + +[source, graphql, indent=0] +---- +new Neo4jGraphQL({ + features: { + excludeDeprecatedFields: { + deprecatedOptionsArgument: true + } + } +}) +---- + === Deprecated `directed` argument in `@relationship` fields @@ -546,6 +488,21 @@ The `directed` argument was used to change the query direction of the relationsh The `directed` argument in `@relationship` fields is deprecated and will be removed in the future. Configure the query direction via the `queryDirection` and `direction` arguments of the `@relationship` directive instead. +The `directed` argument can be disabled from the generated schema with the option `directedArgument` set to `true`: + + +[source, javascript] +---- +new Neo4jGraphQL({ + features: { + excludeDeprecatedFields: { + directedArgument: true + } + } +}) +---- + + === Deprecated `@relationship.queryDirection` `_DEFAULT` and `_ONLY` options Following the deprecation of the `directed` argument, the values accepted by the `@relationship.queryDirection` have changed: @@ -561,6 +518,250 @@ A warning is raised if you use a deprecated value. `typename_IN` filter has been deprecated in favor of `typename`. +`typename_IN` can be disabled from the generated schema with the option `typename_IN` set to `true`: + + +[source, javascript] +---- +new Neo4jGraphQL({ + features: { + excludeDeprecatedFields: { + typename_IN: true + } + } +}) +---- + === Deprecated aggregations on ID fields Aggregations on ID fields are now deprecated and will be removed in the future. + +ID fields in aggregations can be disabled from the generated schema with the option `idAggregations` set to `true`: + + +[source, javascript] +---- +new Neo4jGraphQL({ + features: { + excludeDeprecatedFields: { + idAggregations: true + } + } +}) +---- + + + +=== Deprecated `@unique` directive + +The xref::/directives/indexes-and-constraints.adoc#_unique[`@unique`] directive will no longer be supported in future versions. +It cannot always be reliably enforced, potentially leading to data inconsistencies that don't match the schema. + + + +=== Deprecated `overwrite` argument in `connect` + +The `overwrite` argument in `connect` operations has been deprecated. +This is part of the overarching changes to how `connect` operations work in version 7. + +[source, graphql, indent=0] +---- +mutation { + updateMovies( + where: { title_EQ: "Matrix" } + update: { + actors: { + connect: { overwrite: true, where: { node: { name_EQ: "Keanu" } } } + } + } + ) { + movies { + title + } + } +} +---- + + +=== Deprecated `connectOrCreate` mutation + +The `connectOrCreate` mutation is deprecated and will be removed in the next major version: + +[source, graphql, indent=0] +---- +mutation CreateActors { + updateActors( + update: { + movies: { + connectOrCreate: [{ where: { node: { title_EQ: "The Matrix" } } }] + } + } + ) { + actors { + name + } + } +} +---- + +`connectOrCreate` mutations can be disabled from the generated schema with the option `connectOrCreate` set to `true`: + + +[source, javascript] +---- +new Neo4jGraphQL({ + features: { + excludeDeprecatedFields: { + connectOrCreate: true + } + } +}) +---- + + +=== Deprecated `*Aggregate` fields + +Top level and nested `*Aggregate` fields have been deprecated in favor of `aggregate` fields inside connections: + +[cols="1,1"] +|=== +|Before | Now + +a| +[source, graphql, indent=0] +---- +query { + moviesAggregate { + rating { + min + } + } +} +---- +a| +[source, graphql, indent=0] +---- +query { + moviesConnection { + aggregate { + node { + rating { + min + } + } + } + } +} +---- +|=== + + +`*Aggregate` fields can be disabled from the generated schema with the option `deprecatedAggregateOperations` set to `true`: + + +[source, javascript] +---- +new Neo4jGraphQL({ + features: { + excludeDeprecatedFields: { + deprecatedAggregateOperations: true + } + } +}) +---- + + +==== `count` field changes in new `aggregate` fields + +The `count` field inside `aggregate` fields differs from the old `count` and now contains `nodes`: + +[cols="1,1"] +|=== +|Before | Now + +a| +[source, graphql, indent=0] +---- +query Movies { + moviesAggregate { + count + } +} +---- +a| +[source, graphql, indent=0] +---- +query { + moviesConnection { + aggregate { + count { + nodes + } + } + } +} +---- +|=== + + +=== Implicit set operation + +Setting fields in operations must append the `_SET` operator. +The previous format which only uses the field name is deprecated: + +[cols="1,1"] +|=== +|Before | Now + +a| +[source, graphql, indent=0] +---- +mutation { + updateMovies(update: { title: "The Matrix" }) { + movies { + title + } + } +} +---- +a| +[source, graphql, indent=0] +---- +mutation { + updateMovies(update: { title_SET: "The Matrix" }) { + movies { + title + } + } +} +---- +|=== + + + +Implicit set input fields can be disabled from the generated schema with the option `implicitSet` set to `true`: + + +[source, javascript] +---- +new Neo4jGraphQL({ + features: { + excludeDeprecatedFields: { + implicitSet: true + } + } +}) +---- + + +=== Deprecated `@private` directive + +The `@private` directive is deprecated and will be removed in the next version of the library. +`@private` was intended to be used with the OGM, which is no longer supported. + +[source, graphql, indent=0] +---- +type Movie @node { + title: String! @private +} +----