Skip to content

Commit de1aea9

Browse files
Version Packages
1 parent 3873c9f commit de1aea9

File tree

7 files changed

+78
-81
lines changed

7 files changed

+78
-81
lines changed

.changeset/plenty-pants-fold.md

-67
This file was deleted.

.changeset/ten-walls-grin.md

-5
This file was deleted.

.changeset/wicked-shrimps-draw.md

-5
This file was deleted.

packages/apollo-federation-subgraph-compatibility/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"dependencies": {
1111
"@apollo/server": "^4.7.0",
1212
"@graphql-tools/wrap": "^10.0.0",
13-
"@neo4j/graphql": "^6.3.1",
13+
"@neo4j/graphql": "^6.4.0",
1414
"graphql": "16.10.0",
1515
"graphql-tag": "^2.12.6",
1616
"neo4j-driver": "^5.8.0"

packages/graphql/CHANGELOG.md

+74
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,79 @@
11
# @neo4j/graphql
22

3+
## 6.4.0
4+
5+
### Minor Changes
6+
7+
- [#6029](https://github.com/neo4j/graphql/pull/6029) [`f792a02`](https://github.com/neo4j/graphql/commit/f792a0259ad489b95e6241c20be6d27525712f3b) Thanks [@darrellwarde](https://github.com/darrellwarde)! - Add a new field directive `@sortable` which can be used to configure whether results can be sorted by field values or not.
8+
9+
### Patch Changes
10+
11+
- [#6046](https://github.com/neo4j/graphql/pull/6046) [`dcf4c76`](https://github.com/neo4j/graphql/commit/dcf4c761b21e8dbce8436e4000eae53f9780923c) Thanks [@angrykoala](https://github.com/angrykoala)! - Add `unsafeEscapeOptions` to `Neo4jGraphQL` features with the following flags:
12+
13+
- `disableRelationshipTypeEscaping` (default to `false`)
14+
- `disableNodeLabelEscaping` (defaults to `false`)
15+
16+
These flags remove the automatic escaping of node labels and relationship types in the generated Cypher.
17+
18+
For example, given the following schema:
19+
20+
```graphql
21+
type Actor {
22+
name: String!
23+
}
24+
25+
type Movie {
26+
title: String!
27+
actors: [Actor!]! @relationship(type: "ACTED IN", direction: OUT)
28+
}
29+
```
30+
31+
A GraphQL query going through the `actors` relationship:
32+
33+
```graphql
34+
query {
35+
movies {
36+
title
37+
actors {
38+
name
39+
}
40+
}
41+
}
42+
```
43+
44+
Will normally generate the following Cypher for the relationship:
45+
46+
```cypher
47+
MATCH (this:Movie)-[this0:`ACTED IN`]->(this1:Actor)
48+
```
49+
50+
The label `ACTED IN` is escaped by placing it inside backticks (`\``), as some characters in it are susceptible of code injection.
51+
52+
If the option `disableRelationshipTypeEscaping` is set in `Neo4jGraphQL`, this safety mechanism will be disabled:
53+
54+
```js
55+
new Neo4jGraphQL({
56+
typeDefs,
57+
features: {
58+
unsafeEscapeOptions: {
59+
disableRelationshipTypeEscaping: true,
60+
},
61+
},
62+
});
63+
```
64+
65+
Generating the following (incorrect) Cypher instead:
66+
67+
```cypher
68+
MATCH (this:Movie)-[this0:ACTED IN]->(this1:Actor)
69+
```
70+
71+
This can be useful in very custom scenarios where the Cypher needs to be tweaked or if the labels and types have already been escaped.
72+
73+
> Warning: This is a safety mechanism to avoid Cypher injection. Changing these options may lead to code injection and an unsafe server.
74+
75+
- [#6042](https://github.com/neo4j/graphql/pull/6042) [`9ff8a10`](https://github.com/neo4j/graphql/commit/9ff8a1010d1e87d494adc3969f0f8110351ee584) Thanks [@MacondoExpress](https://github.com/MacondoExpress)! - Fixed bug that causes connection fields for interfaces to not be able to be filtered using the typename filters.
76+
377
## 6.3.1
478

579
### Patch Changes

packages/graphql/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@neo4j/graphql",
3-
"version": "6.3.1",
3+
"version": "6.4.0",
44
"description": "A GraphQL to Cypher query execution layer for Neo4j and JavaScript GraphQL implementations",
55
"keywords": [
66
"neo4j",

yarn.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -2151,7 +2151,7 @@ __metadata:
21512151
languageName: node
21522152
linkType: soft
21532153

2154-
"@neo4j/graphql@npm:^6.2.2, @neo4j/graphql@npm:^6.3.1, @neo4j/graphql@workspace:packages/graphql":
2154+
"@neo4j/graphql@npm:^6.2.2, @neo4j/graphql@npm:^6.4.0, @neo4j/graphql@workspace:packages/graphql":
21552155
version: 0.0.0-use.local
21562156
resolution: "@neo4j/graphql@workspace:packages/graphql"
21572157
dependencies:
@@ -3911,7 +3911,7 @@ __metadata:
39113911
"@apollo/federation-subgraph-compatibility": "npm:2.2.0"
39123912
"@apollo/server": "npm:^4.7.0"
39133913
"@graphql-tools/wrap": "npm:^10.0.0"
3914-
"@neo4j/graphql": "npm:^6.3.1"
3914+
"@neo4j/graphql": "npm:^6.4.0"
39153915
fork-ts-checker-webpack-plugin: "npm:9.0.2"
39163916
graphql: "npm:16.10.0"
39173917
graphql-tag: "npm:^2.12.6"

0 commit comments

Comments
 (0)