Releases: neo4j/graphql
@neo4j/graphql@6.5.0
Minor Changes
-
#6003
2952820
Thanks @angrykoala! - Add count fields in aggregations with support for nodes and edges count:query { moviesConnection { aggregate { count { nodes } } } }
query { movies { actorsConnection { aggregate { count { nodes edges } } } } }
-
#5944
a6e9486
Thanks @angrykoala! - Add aggregate field in connection:query { moviesConnection { aggregate { node { count int { longest } } } } }
Patch Changes
-
#5999
47f915e
Thanks @angrykoala! - Deprecate aggregation fields (e.gactedInAggregate
) in favor of the fieldaggregate
inside the connection (e.gactedInConnection -> aggregate
) -
#5944
a6e9486
Thanks @angrykoala! - Deprecate old aggregate operations:query { moviesAggregate { count rating { min } } }
These fields can be completely removed from the schema with the new flag
deprecatedAggregateOperations
:const neoSchema = new Neo4jGraphQL({ typeDefs, features: { excludeDeprecatedFields: { deprecatedAggregateOperations: true } }, });
@neo4j/graphql@6.4.0
Minor Changes
- #6029
f792a02
Thanks @darrellwarde! - Add a new field directive@sortable
which can be used to configure whether results can be sorted by field values or not.
Patch Changes
-
#6046
dcf4c76
Thanks @angrykoala! - AddunsafeEscapeOptions
toNeo4jGraphQL
features with the following flags:-
disableRelationshipTypeEscaping
(default tofalse
) -
disableNodeLabelEscaping
(defaults tofalse
)These flags remove the automatic escaping of node labels and relationship types in the generated Cypher.
For example, given the following schema:
type Actor { name: String! } type Movie { title: String! actors: [Actor!]! @relationship(type: "ACTED IN", direction: OUT) }
A GraphQL query going through the
actors
relationship:query { movies { title actors { name } } }
Will normally generate the following Cypher for the relationship:
MATCH (this:Movie)-[this0:`ACTED IN`]->(this1:Actor)
The label
ACTED IN
is escaped by placing it inside backticks (```), as some characters in it are susceptible of code injection.If the option
disableRelationshipTypeEscaping
is set inNeo4jGraphQL
, this safety mechanism will be disabled:new Neo4jGraphQL({ typeDefs, features: { unsafeEscapeOptions: { disableRelationshipTypeEscaping: true, }, }, });
Generating the following (incorrect) Cypher instead:
MATCH (this:Movie)-[this0:ACTED IN]->(this1:Actor)
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.
Warning: This is a safety mechanism to avoid Cypher injection. Changing these options may lead to code injection and an unsafe server.
-
-
#6042
9ff8a10
Thanks @MacondoExpress! - Fixed bug that causes connection fields for interfaces to not be able to be filtered using the typename filters.
@neo4j/graphql@5.12.0
Minor Changes
- #6033
48704e2
Thanks @darrellwarde! - Add a new field directive@sortable
which can be used to configure whether results can be sorted by field values or not.
Patch Changes
-
#6043
d090d0b
Thanks @angrykoala! - AddunsafeEscapeOptions
toNeo4jGraphQL
features with the following flags:disableRelationshipTypeEscaping
(default tofalse
)disableNodeLabelEscaping
(defaults tofalse
)
These flags remove the automatic escaping of node labels and relationship types in the generated Cypher.
For example, given the following schema:
type Actor { name: String! } type Movie { title: String! actors: [Actor!]! @relationship(type: "ACTED IN", direction: OUT) }
A GraphQL query going through the
actors
relationship:query { movies { title actors { name } } }
Will normally generate the following Cypher for the relationship:
MATCH (this:Movie)-[this0:`ACTED IN`]->(this1:Actor)
The label
ACTED IN
is escaped by placing it inside backticks (```), as some characters in it are susceptible of code injection.If the option
disableRelationshipTypeEscaping
is set inNeo4jGraphQL
, this safety mechanism will be disabled:new Neo4jGraphQL({ typeDefs, features: { unsafeEscapeOptions: { disableRelationshipTypeEscaping: true, }, }, });
Generating the following (incorrect) Cypher instead:
MATCH (this:Movie)-[this0:ACTED IN]->(this1:Actor)
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.
Warning: This is a safety mechanism to avoid Cypher injection. Changing these options may lead to code injection and an unsafe server.
-
#6041
c119004
Thanks @MacondoExpress! - Fixed bug that causes connection fields for interfaces to not be able to be filtered using the typename filters.
@neo4j/graphql-ogm@5.12.0
Patch Changes
- Updated dependencies [
d090d0b
,48704e2
,c119004
]:- @neo4j/graphql@5.12.0
@neo4j/graphql@7.0.0-alpha.3
Major Changes
-
#5997
a716ef8
Thanks @angrykoala! - Removepublish
method fromNeo4jGraphQLSubscriptionsEngine
interface as it is no longer used with CDC-based subscriptions. Implementing this method on custom engines will no longer have an effect, and it is no longer possible to callpublish
directly onNeo4jGraphQLSubscriptionsCDCEngine
-
#5976
7ddde75
Thanks @angrykoala! - Sets addVersionPrefix to true by default, this will prepend the Cypher version to all queries by default, ensuring that the correct Cypher version is used in Neo4j:CYPHER 5 MATCH(this:Movie)
This may be incompatible with older versions of Neo4j and can be disabled by setting
cypherQueryOption.addVersionPrefix
in the context to false:{ cypherQueryOptions: { addVersionPrefix: true, }, }
For example, for an apollo server:
await startStandaloneServer(server, { context: async ({ req }) => ({ req, cypherQueryOptions: { addVersionPrefix: false, }, }), listen: { port: 4000 }, });
Patch Changes
- #6007
48aec51
Thanks @darrellwarde! - Allowapp
to be overwritten in transaction metadata
@neo4j/graphql@6.3.1
Patch Changes
-
#5952
4e14680
Thanks @angrykoala! - AddaddVersionPrefix
tocypherQueryOptions
in context to add a Cypher version withCYPHER
before each query:{ cypherQueryOptions: { addVersionPrefix: true, }, }
This prepends all Cypher queries with a
CYPHER [version]
statement:CYPHER 5 MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this
@neo4j/graphql@5.11.5
Patch Changes
-
#5996
a5962ea
Thanks @angrykoala! - Fix error "SchemaModel not available on subscription mechanism" with some subscriptions engines when used with Federation -
#5969
80fb066
Thanks @angrykoala! - AddaddVersionPrefix
tocypherQueryOptions
in context to add a Cypher version withCYPHER
before each query:{ cypherQueryOptions: { addVersionPrefix: true, }, }
This prepends all Cypher queries with a
CYPHER [version]
statement:CYPHER 5 MATCH (this:Movie) WHERE this.title = $param0 RETURN this { .title } AS this
@neo4j/graphql-ogm@5.11.5
Patch Changes
- Updated dependencies [
a5962ea
,80fb066
]:- @neo4j/graphql@5.11.5
@neo4j/graphql@3.24.4
Important
This is an important patch release which ensures compatibility with the upcoming Neo4j 2025 release. Before you upgrade to Neo4j 2025, please ensure that you have applied this patch upgrade.
Patch Changes
- #5966
a369ffb60
Thanks @angrykoala! - Add support for CalVer editions of neo4j
@neo4j/graphql-ogm@3.24.4
Important
This is an important patch release which ensures compatibility with the upcoming Neo4j 2025 release. Before you upgrade to Neo4j 2025, please ensure that you have applied this patch upgrade.
Patch Changes
- Updated dependencies [
a369ffb60
]:- @neo4j/graphql@3.24.4