Skip to content

Commit

Permalink
Version Packages (alpha)
Browse files Browse the repository at this point in the history
  • Loading branch information
neo4j-team-graphql committed Dec 20, 2024
1 parent 9faf0f8 commit 1d4dbec
Show file tree
Hide file tree
Showing 7 changed files with 249 additions and 8 deletions.
19 changes: 18 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,22 @@
"@neo4j/introspector": "4.0.0",
"@neo4j/package-tests": "1.0.0"
},
"changesets": []
"changesets": [
"beige-poets-move",
"chatty-plants-dress",
"clean-hairs-pretend",
"cyan-grapes-laugh",
"healthy-swans-shave",
"little-lemons-fail",
"loud-phones-march",
"perfect-zoos-push",
"red-cows-shop",
"short-pillows-itch",
"sixty-clocks-design",
"slow-dolls-whisper",
"soft-planets-exercise",
"strong-jobs-eat",
"tame-melons-confess",
"ten-starfishes-attend"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@apollo/server": "^4.7.0",
"@graphql-tools/wrap": "^10.0.0",
"@neo4j/graphql": "^6.2.3",
"@neo4j/graphql": "^7.0.0-alpha.0",
"graphql": "16.9.0",
"graphql-tag": "^2.12.6",
"neo4j-driver": "^5.8.0"
Expand Down
214 changes: 214 additions & 0 deletions packages/graphql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,219 @@
# @neo4j/graphql

## 7.0.0-alpha.0

### Major Changes

- [#5899](https://github.com/neo4j/graphql/pull/5899) [`7335d8f`](https://github.com/neo4j/graphql/commit/7335d8f416bbfa08feab0fe4983f89590f984e1c) Thanks [@darrellwarde](https://github.com/darrellwarde)! - Nested mutation operations now follow the relationship direction behaviour as defined in `queryDirection`

- [#5872](https://github.com/neo4j/graphql/pull/5872) [`925ad8d`](https://github.com/neo4j/graphql/commit/925ad8dedc307200d1c3fd813e531325940d8f8f) Thanks [@angrykoala](https://github.com/angrykoala)! - Remove `@private` directive. This directive was intended to be used with the library `@neo4j/graphql-ogm` which is no longer supported.

- [#5895](https://github.com/neo4j/graphql/pull/5895) [`6afcadd`](https://github.com/neo4j/graphql/commit/6afcaddbfc62549c6c610a2199513bf4c719486c) Thanks [@angrykoala](https://github.com/angrykoala)! - Fails schema generation if there are conflicting plural names in types. For example, the following schema will fail, due to ambiguous `Techs` plural

```graphql
type Tech @node(plural: "Techs") {
name: String
}

type Techs {
value: String
}
```

- [#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.

- [#5819](https://github.com/neo4j/graphql/pull/5819) [`ac1fa62`](https://github.com/neo4j/graphql/commit/ac1fa629f1eb8b248116bd9dedaabc02117fdbee) Thanks [@angrykoala](https://github.com/angrykoala)! - Single element relationships have been removed in favor of list relationships:

Before

```graphql
type Movie {
director: Person @relationship(type: "DIRECTED", direction: "IN")
}
```

After

```graphql
type Movie {
director: [Person!]! @relationship(type: "DIRECTED", direction: "IN")
}
```

This requires updating filters, clients and auth rules to use the list filter operations.

Single element relationships cannot be reliably enforced, leading to a data inconsistent with the schema. If the GraphQL model requires 1-1 relationships (such as in federations) these can now be achieved with the `@cypher` directive instead:

```graphql
type Movie {
director: Person
@cypher(
statement: """
MATCH(this)-[:ACTED_IN]->(p:Person)
RETURN p
"""
columnName: "p"
)
}
```

- [#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.

- [#5820](https://github.com/neo4j/graphql/pull/5820) [`d8d59f8`](https://github.com/neo4j/graphql/commit/d8d59f80480017d27b49b062321a9a15b6494a96) Thanks [@MacondoExpress](https://github.com/MacondoExpress)! - Change the way how `@node` behaves, `@node` is now required, and GraphQL Object types without the directive `@node` will no longer considered as a Neo4j Nodes representation.
Queries and Mutations will be generated only for types with the `@node` directive.

- [#5801](https://github.com/neo4j/graphql/pull/5801) [`95ce8bb`](https://github.com/neo4j/graphql/commit/95ce8bb884bddaf20d751f2448b5504a7b94d081) Thanks [@darrellwarde](https://github.com/darrellwarde)! - Implicit filtering fields have been removed, please use the explicit versions:

```graphql
# Old syntax
{
movies(where: { title: "The Matrix" }) {
title
}
}

# New syntax
{
movies(where: { title_EQ: "The Matrix" }) {
title
}
}
```

The `implicitEqualFilters` option of `excludeDeprecatedFields` has been removed.

- [#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.

- [#5802](https://github.com/neo4j/graphql/pull/5802) [`99cb9aa`](https://github.com/neo4j/graphql/commit/99cb9aa866eed04224d790bfccab9c3d3add78b7) Thanks [@darrellwarde](https://github.com/darrellwarde)! - Implicit set operations have been removed. For example:

```graphql
# Old syntax
mutation {
updateMovies(where: { title_EQ: "Matrix" }, update: { title: "The Matrix" }) {
movies {
title
}
}
}

# New syntax
mutation {
updateMovies(where: { title_EQ: "Matrix" }, update: { title_SET: "The Matrix" }) {
movies {
title
}
}
}
```

The `implicitSet` argument of `excludeDeprecatedFields` has been removed.

- [#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.

### Patch Changes

- [#5837](https://github.com/neo4j/graphql/pull/5837) [`721691a`](https://github.com/neo4j/graphql/commit/721691a84eaa34996c0c97edb7ede1ae4775dd2f) Thanks [@MacondoExpress](https://github.com/MacondoExpress)! - Added a validation rule to avoid defining fields as lists of nullable elements, as Neo4j does not support this.

## 6.2.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@neo4j/graphql",
"version": "6.2.3",
"version": "7.0.0-alpha.0",
"description": "A GraphQL to Cypher query execution layer for Neo4j and JavaScript GraphQL implementations",
"keywords": [
"neo4j",
Expand Down
10 changes: 10 additions & 0 deletions packages/introspector/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @neo4j/introspector

## 5.0.0-alpha.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.

### Patch Changes

- [#5837](https://github.com/neo4j/graphql/pull/5837) [`721691a`](https://github.com/neo4j/graphql/commit/721691a84eaa34996c0c97edb7ede1ae4775dd2f) Thanks [@MacondoExpress](https://github.com/MacondoExpress)! - Changed how "@neo4j/introspector" generates list fields that now are generated as a list of non-nullable elements, as a list of nullable elements is not supported by Neo4j.

## 4.0.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/introspector/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@neo4j/introspector",
"version": "4.0.1",
"version": "5.0.0-alpha.0",
"description": "Introspect a Neo4j database model/schema",
"keywords": [
"neo4j",
Expand Down Expand Up @@ -34,7 +34,7 @@
},
"author": "Neo4j Inc.",
"devDependencies": {
"@neo4j/graphql": "^6.2.2",
"@neo4j/graphql": "^7.0.0-alpha.0",
"@types/jest": "29.5.14",
"@types/node": "22.9.2",
"@types/pluralize": "0.0.33",
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2072,7 +2072,7 @@ __metadata:
languageName: node
linkType: soft

"@neo4j/graphql@npm:^6.2.2, @neo4j/graphql@npm:^6.2.3, @neo4j/graphql@workspace:packages/graphql":
"@neo4j/graphql@npm:^7.0.0-alpha.0, @neo4j/graphql@workspace:packages/graphql":
version: 0.0.0-use.local
resolution: "@neo4j/graphql@workspace:packages/graphql"
dependencies:
Expand Down Expand Up @@ -2134,7 +2134,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@neo4j/introspector@workspace:packages/introspector"
dependencies:
"@neo4j/graphql": "npm:^6.2.2"
"@neo4j/graphql": "npm:^7.0.0-alpha.0"
"@types/jest": "npm:29.5.14"
"@types/node": "npm:22.9.2"
"@types/pluralize": "npm:0.0.33"
Expand Down Expand Up @@ -3843,7 +3843,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.2.3"
"@neo4j/graphql": "npm:^7.0.0-alpha.0"
fork-ts-checker-webpack-plugin: "npm:9.0.2"
graphql: "npm:16.9.0"
graphql-tag: "npm:^2.12.6"
Expand Down

0 comments on commit 1d4dbec

Please sign in to comment.