|
1 | 1 | # @neo4j/graphql
|
2 | 2 |
|
| 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 | + |
3 | 77 | ## 6.3.1
|
4 | 78 |
|
5 | 79 | ### Patch Changes
|
|
0 commit comments