diff --git a/.changeset/brave-chicken-hunt.md b/.changeset/brave-chicken-hunt.md deleted file mode 100644 index a060ae3087..0000000000 --- a/.changeset/brave-chicken-hunt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@neo4j/graphql": patch ---- - -Add deprecation warning when using `@unique` diff --git a/.changeset/chilled-zebras-help.md b/.changeset/chilled-zebras-help.md deleted file mode 100644 index 059d348d76..0000000000 --- a/.changeset/chilled-zebras-help.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -"@neo4j/graphql": patch ---- - -Deprecate single element relationships: - -```graphql -type Movie { - director: Person @relationship(type: "DIRECTED", direction: "IN") -} -``` - -In favor of list relationships: - -```graphql -type Movie { - director: [Person!]! @relationship(type: "DIRECTED", direction: "IN") -} -``` - -1-1 relationships cannot be reliably enforced, leading to a data inconsistent between the schema and the database. For this reason, these have been removed in favor of the more accurate list relationships. diff --git a/.changeset/cyan-grapes-laugh.md b/.changeset/cyan-grapes-laugh.md deleted file mode 100644 index 41fd62574b..0000000000 --- a/.changeset/cyan-grapes-laugh.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@neo4j/graphql": major ---- - -Remove support for `connectOrCreate` operations diff --git a/.changeset/fresh-pumpkins-doubt.md b/.changeset/fresh-pumpkins-doubt.md deleted file mode 100644 index 827943eb3a..0000000000 --- a/.changeset/fresh-pumpkins-doubt.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -"@neo4j/graphql": patch ---- - -Deprecate implicit `SET`: - -```graphql -mutation { - updateMovies( update: { id: "2" }) { - movies { - id - } - } -} -``` -in favour of the explicit `_SET` version: - -```graphql -mutation { - updateMovies(update: { id_SET: "2" }) { - movies { - id - } - } -} -``` diff --git a/.changeset/healthy-swans-shave.md b/.changeset/healthy-swans-shave.md deleted file mode 100644 index 1fc4dac9b1..0000000000 --- a/.changeset/healthy-swans-shave.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@neo4j/graphql": major ---- - -The deprecated `directed` argument has been removed, and `queryDirection` now only accepts two possible values - `DIRECTED` (default) and `UNDIRECTED`. - -Additionally, the `directedArgument` setting of `excludeDeprecatedFields` has been removed as these deprecated fields have been removed. diff --git a/.changeset/loud-phones-march.md b/.changeset/loud-phones-march.md deleted file mode 100644 index 7c45f04987..0000000000 --- a/.changeset/loud-phones-march.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -"@neo4j/graphql": major ---- - -There have been major changes to the way that full-text search operates. - -The directive now requires the specification of an index name, query name, and indexed fields. - -```graphql -input FulltextInput { - indexName: String! - queryName: String! - fields: [String]! -} - -""" -Informs @neo4j/graphql that there should be a fulltext index in the database, allows users to search by the index in the generated schema. -""" -directive @fulltext(indexes: [FulltextInput]!) on OBJECT -``` - -Here is an example of how this might be used: - -```graphql -type Movie @node @fulltext(indexName: "movieTitleIndex", queryName: "moviesByTitle", fields: ["title"]) { - title: String! -} -``` - -Full-text search was previously available in two different locations. - -The following form has now been completely removed: - -```graphql -# Removed -{ - movies(fulltext: { movieTitleIndex: { phrase: "The Matrix" } }) { - title - } -} -``` - -The following form as a root-level query has been changed: - -```graphql -# Old query -query { - moviesByTitle(phrase: "The Matrix") { - score - movies { - title - } - } -} - -# New query -query { - moviesByTitle(phrase: "The Matrix") { - edges { - score - node { - title - } - } - } -} -``` - -The new form is as a Relay connection, which allows for pagination using cursors and access to the `pageInfo` field. diff --git a/.changeset/mean-horses-worry.md b/.changeset/mean-horses-worry.md deleted file mode 100644 index 0e9059917b..0000000000 --- a/.changeset/mean-horses-worry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@neo4j/graphql": patch ---- - -Added `implicitSet` to the `excludeDeprecatedFields` setting, to disable generation of the deprecated mutation field without the suffix `_SET`. diff --git a/.changeset/perfect-dryers-love.md b/.changeset/perfect-dryers-love.md deleted file mode 100644 index 14464d3b35..0000000000 --- a/.changeset/perfect-dryers-love.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@neo4j/graphql": patch ---- - -Argument `overwrite` in `connect` operations has been deprecated diff --git a/.changeset/quiet-frogs-reflect.md b/.changeset/quiet-frogs-reflect.md deleted file mode 100644 index 1554fea4d3..0000000000 --- a/.changeset/quiet-frogs-reflect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@neo4j/graphql": patch ---- - -The `connectOrCreate` operation has been deprecated and will be removed in the next major version of the Neo4j GraphQL Library. Its implementation has always been more limited than the other operations, so the decision has been taken to remove it for the time being with a view of potentially refocussing on it again in the future. diff --git a/.changeset/seven-bobcats-carry.md b/.changeset/seven-bobcats-carry.md deleted file mode 100644 index 24366790f3..0000000000 --- a/.changeset/seven-bobcats-carry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@neo4j/graphql": minor ---- - -Add filtering on 1 to 1 relationship custom cypher fields diff --git a/.changeset/short-pillows-itch.md b/.changeset/short-pillows-itch.md deleted file mode 100644 index d33cdecc13..0000000000 --- a/.changeset/short-pillows-itch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@neo4j/graphql": major ---- - -Remove support for `@unique` directive diff --git a/.changeset/slow-dolls-whisper.md b/.changeset/slow-dolls-whisper.md deleted file mode 100644 index 8e2b01f7b5..0000000000 --- a/.changeset/slow-dolls-whisper.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@neo4j/graphql": major ---- - -Remove `overwrite` field in connect operations diff --git a/.changeset/soft-planets-exercise.md b/.changeset/soft-planets-exercise.md deleted file mode 100644 index e7e22dfb8e..0000000000 --- a/.changeset/soft-planets-exercise.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -"@neo4j/graphql": major ---- - -The deprecated `options` argument has been removed. - -Consider the following type definitions: - -```graphql -type Movie { - title: String! -} -``` - -The migration is as below: - -```graphql -# Old syntax -{ - movies(options: { first: 10, offset: 10, sort: [{ title: ASC }] }) { - title - } -} - -# New syntax -{ - movies(first: 10, offset: 10, sort: [{ title: ASC }]) { - title - } -} -``` - -The `deprecatedOptionsArgument` of `excludeDeprecatedFields` has been removed as it is now a no-op. diff --git a/.changeset/ten-starfishes-attend.md b/.changeset/ten-starfishes-attend.md deleted file mode 100644 index 660d78aab8..0000000000 --- a/.changeset/ten-starfishes-attend.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@neo4j/introspector": major -"@neo4j/graphql": major ---- - -The Neo4j GraphQL Library and Introspector now required Node.js 22 or greater. diff --git a/.changeset/three-planes-train.md b/.changeset/three-planes-train.md deleted file mode 100644 index ba9568a75f..0000000000 --- a/.changeset/three-planes-train.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@neo4j/graphql": patch ---- - -Fix issues #5759 and #5760 to do with sorting vector search results diff --git a/packages/apollo-federation-subgraph-compatibility/package.json b/packages/apollo-federation-subgraph-compatibility/package.json index 98bfe4ed56..12c45b230f 100644 --- a/packages/apollo-federation-subgraph-compatibility/package.json +++ b/packages/apollo-federation-subgraph-compatibility/package.json @@ -10,7 +10,7 @@ "dependencies": { "@apollo/server": "^4.7.0", "@graphql-tools/wrap": "^10.0.0", - "@neo4j/graphql": "^6.0.0", + "@neo4j/graphql": "^7.0.0", "graphql": "16.9.0", "graphql-tag": "^2.12.6", "neo4j-driver": "^5.8.0" diff --git a/packages/graphql/CHANGELOG.md b/packages/graphql/CHANGELOG.md index 01846b3874..a8c93c11a4 100644 --- a/packages/graphql/CHANGELOG.md +++ b/packages/graphql/CHANGELOG.md @@ -1,5 +1,175 @@ # @neo4j/graphql +## 7.0.0 + +### Major Changes + +- [#5755](https://github.com/neo4j/graphql/pull/5755) [`9c75f92`](https://github.com/neo4j/graphql/commit/9c75f925884de42f64e1b5c3086cc87c114727bd) Thanks [@angrykoala](https://github.com/angrykoala)! - Remove support for `connectOrCreate` operations + +- [#5778](https://github.com/neo4j/graphql/pull/5778) [`56022ba`](https://github.com/neo4j/graphql/commit/56022ba38d8beb6cb5d7bbfb5e856fd57d9660c5) Thanks [@darrellwarde](https://github.com/darrellwarde)! - The deprecated `directed` argument has been removed, and `queryDirection` now only accepts two possible values - `DIRECTED` (default) and `UNDIRECTED`. + + Additionally, the `directedArgument` setting of `excludeDeprecatedFields` has been removed as these deprecated fields have been removed. + +- [#5762](https://github.com/neo4j/graphql/pull/5762) [`87e416b`](https://github.com/neo4j/graphql/commit/87e416b2547b75824d9782fd5da90c003437e7c0) Thanks [@darrellwarde](https://github.com/darrellwarde)! - There have been major changes to the way that full-text search operates. + + The directive now requires the specification of an index name, query name, and indexed fields. + + ```graphql + input FulltextInput { + indexName: String! + queryName: String! + fields: [String]! + } + + """ + Informs @neo4j/graphql that there should be a fulltext index in the database, allows users to search by the index in the generated schema. + """ + directive @fulltext(indexes: [FulltextInput]!) on OBJECT + ``` + + Here is an example of how this might be used: + + ```graphql + type Movie @node @fulltext(indexName: "movieTitleIndex", queryName: "moviesByTitle", fields: ["title"]) { + title: String! + } + ``` + + Full-text search was previously available in two different locations. + + The following form has now been completely removed: + + ```graphql + # Removed + { + movies(fulltext: { movieTitleIndex: { phrase: "The Matrix" } }) { + title + } + } + ``` + + The following form as a root-level query has been changed: + + ```graphql + # Old query + query { + moviesByTitle(phrase: "The Matrix") { + score + movies { + title + } + } + } + + # New query + query { + moviesByTitle(phrase: "The Matrix") { + edges { + score + node { + title + } + } + } + } + ``` + + The new form is as a Relay connection, which allows for pagination using cursors and access to the `pageInfo` field. + +- [#5755](https://github.com/neo4j/graphql/pull/5755) [`9c75f92`](https://github.com/neo4j/graphql/commit/9c75f925884de42f64e1b5c3086cc87c114727bd) Thanks [@angrykoala](https://github.com/angrykoala)! - Remove support for `@unique` directive + +- [#5768](https://github.com/neo4j/graphql/pull/5768) [`e338590`](https://github.com/neo4j/graphql/commit/e338590d25216cced8252cfe3d0789d97952c20d) Thanks [@angrykoala](https://github.com/angrykoala)! - Remove `overwrite` field in connect operations + +- [#5777](https://github.com/neo4j/graphql/pull/5777) [`0ecfd71`](https://github.com/neo4j/graphql/commit/0ecfd71a1431c5f98fde30319eefd5b018a06701) Thanks [@darrellwarde](https://github.com/darrellwarde)! - The deprecated `options` argument has been removed. + + Consider the following type definitions: + + ```graphql + type Movie { + title: String! + } + ``` + + The migration is as below: + + ```graphql + # Old syntax + { + movies(options: { first: 10, offset: 10, sort: [{ title: ASC }] }) { + title + } + } + + # New syntax + { + movies(first: 10, offset: 10, sort: [{ title: ASC }]) { + title + } + } + ``` + + The `deprecatedOptionsArgument` of `excludeDeprecatedFields` has been removed as it is now a no-op. + +- [#5789](https://github.com/neo4j/graphql/pull/5789) [`1a07d40`](https://github.com/neo4j/graphql/commit/1a07d40888e89c5cd9a40edc16f1742e27bff687) Thanks [@darrellwarde](https://github.com/darrellwarde)! - The Neo4j GraphQL Library and Introspector now required Node.js 22 or greater. + +### Minor Changes + +- [#5746](https://github.com/neo4j/graphql/pull/5746) [`c581f9e`](https://github.com/neo4j/graphql/commit/c581f9e02b232bf09277ee76aac930eace0877f6) Thanks [@mjfwebb](https://github.com/mjfwebb)! - Add filtering on 1 to 1 relationship custom cypher fields + +### Patch Changes + +- [#5738](https://github.com/neo4j/graphql/pull/5738) [`c6ea37d`](https://github.com/neo4j/graphql/commit/c6ea37dd0ec8485812906bbb7a3b09ae27a54c2f) Thanks [@angrykoala](https://github.com/angrykoala)! - Add deprecation warning when using `@unique` + +- [#5788](https://github.com/neo4j/graphql/pull/5788) [`62a9f61`](https://github.com/neo4j/graphql/commit/62a9f618b7e19813a4c0f162e894aebbe065813a) Thanks [@angrykoala](https://github.com/angrykoala)! - Deprecate single element relationships: + + ```graphql + type Movie { + director: Person @relationship(type: "DIRECTED", direction: "IN") + } + ``` + + In favor of list relationships: + + ```graphql + type Movie { + director: [Person!]! @relationship(type: "DIRECTED", direction: "IN") + } + ``` + + 1-1 relationships cannot be reliably enforced, leading to a data inconsistent between the schema and the database. For this reason, these have been removed in favor of the more accurate list relationships. + +- [#5771](https://github.com/neo4j/graphql/pull/5771) [`c56f9b0`](https://github.com/neo4j/graphql/commit/c56f9b03b10c833099cf9a876b9a62278c152465) Thanks [@MacondoExpress](https://github.com/MacondoExpress)! - Deprecate implicit `SET`: + + ```graphql + mutation { + updateMovies(update: { id: "2" }) { + movies { + id + } + } + } + ``` + + in favour of the explicit `_SET` version: + + ```graphql + mutation { + updateMovies(update: { id_SET: "2" }) { + movies { + id + } + } + } + ``` + +- [#5771](https://github.com/neo4j/graphql/pull/5771) [`f624668`](https://github.com/neo4j/graphql/commit/f624668345939c34dc2f4af56315922ec376d585) Thanks [@MacondoExpress](https://github.com/MacondoExpress)! - Added `implicitSet` to the `excludeDeprecatedFields` setting, to disable generation of the deprecated mutation field without the suffix `_SET`. + +- [#5758](https://github.com/neo4j/graphql/pull/5758) [`7521476`](https://github.com/neo4j/graphql/commit/752147634df57dcfc167e9b1e13943728b80e6e8) Thanks [@angrykoala](https://github.com/angrykoala)! - Argument `overwrite` in `connect` operations has been deprecated + +- [#5748](https://github.com/neo4j/graphql/pull/5748) [`f23bb91`](https://github.com/neo4j/graphql/commit/f23bb91a8afc0ff5d7ca5f0c4d8f867d30127e0b) Thanks [@darrellwarde](https://github.com/darrellwarde)! - The `connectOrCreate` operation has been deprecated and will be removed in the next major version of the Neo4j GraphQL Library. Its implementation has always been more limited than the other operations, so the decision has been taken to remove it for the time being with a view of potentially refocussing on it again in the future. + +- [#5764](https://github.com/neo4j/graphql/pull/5764) [`1ec1bd3`](https://github.com/neo4j/graphql/commit/1ec1bd35a375d3f42e394fffe2d74f62bb4c8359) Thanks [@darrellwarde](https://github.com/darrellwarde)! - Fix issues #5759 and #5760 to do with sorting vector search results + ## 6.0.0 ### Major Changes diff --git a/packages/graphql/package.json b/packages/graphql/package.json index b013c2eb46..0c938bd0b6 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -1,6 +1,6 @@ { "name": "@neo4j/graphql", - "version": "6.0.0", + "version": "7.0.0", "description": "A GraphQL to Cypher query execution layer for Neo4j and JavaScript GraphQL implementations", "keywords": [ "neo4j", diff --git a/packages/introspector/CHANGELOG.md b/packages/introspector/CHANGELOG.md index c3956e6632..f75594a51e 100644 --- a/packages/introspector/CHANGELOG.md +++ b/packages/introspector/CHANGELOG.md @@ -1,5 +1,11 @@ # @neo4j/introspector +## 5.0.0 + +### Major Changes + +- [#5789](https://github.com/neo4j/graphql/pull/5789) [`1a07d40`](https://github.com/neo4j/graphql/commit/1a07d40888e89c5cd9a40edc16f1742e27bff687) Thanks [@darrellwarde](https://github.com/darrellwarde)! - The Neo4j GraphQL Library and Introspector now required Node.js 22 or greater. + ## 4.0.0 ### Major Changes diff --git a/packages/introspector/package.json b/packages/introspector/package.json index 65000b106e..a2bd184bce 100644 --- a/packages/introspector/package.json +++ b/packages/introspector/package.json @@ -1,6 +1,6 @@ { "name": "@neo4j/introspector", - "version": "4.0.0", + "version": "5.0.0", "description": "Introspect a Neo4j database model/schema", "keywords": [ "neo4j", @@ -34,7 +34,7 @@ }, "author": "Neo4j Inc.", "devDependencies": { - "@neo4j/graphql": "^6.0.0", + "@neo4j/graphql": "^7.0.0", "@types/jest": "29.5.14", "@types/node": "22.9.0", "@types/pluralize": "0.0.33", diff --git a/yarn.lock b/yarn.lock index 1e5fb96ca5..e47c458e60 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2072,7 +2072,7 @@ __metadata: languageName: node linkType: soft -"@neo4j/graphql@npm:^6.0.0, @neo4j/graphql@workspace:packages/graphql": +"@neo4j/graphql@npm:^7.0.0, @neo4j/graphql@workspace:packages/graphql": version: 0.0.0-use.local resolution: "@neo4j/graphql@workspace:packages/graphql" dependencies: @@ -2133,7 +2133,7 @@ __metadata: version: 0.0.0-use.local resolution: "@neo4j/introspector@workspace:packages/introspector" dependencies: - "@neo4j/graphql": "npm:^6.0.0" + "@neo4j/graphql": "npm:^7.0.0" "@types/jest": "npm:29.5.14" "@types/node": "npm:22.9.0" "@types/pluralize": "npm:0.0.33" @@ -3787,7 +3787,7 @@ __metadata: "@apollo/federation-subgraph-compatibility": "npm:2.2.0" "@apollo/server": "npm:^4.7.0" "@graphql-tools/wrap": "npm:^10.0.0" - "@neo4j/graphql": "npm:^6.0.0" + "@neo4j/graphql": "npm:^7.0.0" fork-ts-checker-webpack-plugin: "npm:9.0.2" graphql: "npm:16.9.0" graphql-tag: "npm:^2.12.6"