Skip to content

Releases: neo4j/graphql

@neo4j/[email protected]

01 Apr 15:22
fc86e99
Compare
Choose a tag to compare

Minor Changes

  • #6110 100a603 Thanks @darrellwarde! - The where field for nested update operations has been deprecated to be moved within the update input field.
    The where in its deprecated location is a no-op for all nested operations apart from update.

    For example, the following mutation is using the deprecated syntax:

    mutation {
        updateUsers(
            where: { name: { eq: "Darrell" } }
            update: {
                posts: {
                    where: { node: { title: { eq: "Version 7 Release Notes" } } }
                    update: { node: { title: { set: "Version 7 Release Announcement" } } }
                }
            }
        )
    }

    It should be modified to move the where inside the update operation:

    mutation {
        updateUsers(
            where: { name: { eq: "Darrell" } }
            update: {
                posts: {
                    update: {
                        where: { node: { title: { eq: "Version 7 Release Notes" } } }
                        node: { title: { set: "Version 7 Release Announcement" } }
                    }
                }
            }
        )
    }

Patch Changes

  • #6126 7af4bbd Thanks @angrykoala! - Add overwriteArgument option to excludeDeprecatedFields to remove the argument overwrite from connect operations

@neo4j/[email protected]

26 Mar 10:29
828ac5e
Compare
Choose a tag to compare

Patch Changes

  • #6106 c3619e8 Thanks @mjfwebb! - Typescript version has been updated to 5.8.2 slightly changing the emitted code. This change is not expected to have any impact on the generated code or the runtime behavior of the library.

@neo4j/[email protected]

25 Mar 13:10
49b7daa
Compare
Choose a tag to compare

Patch Changes

  • #6105 11952fd Thanks @mjfwebb! - Typescript version has been updated to 5.8.2 slightly changing the emitted code. This change is not expected to have any impact on the generated code or the runtime behavior of the library.

@neo4j/[email protected]

25 Mar 13:10
49b7daa
Compare
Choose a tag to compare

Patch Changes

@neo4j/[email protected]

21 Mar 15:16
37f60bb
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • #6099 d502b93 Thanks @mjfwebb! - Typescript version has been updated to 5.8.2 slightly changing the emitted code. This change is not expected to have any impact on the generated code or the runtime behavior of the library.

@neo4j/[email protected]

14 Mar 11:47
4d9dfee
Compare
Choose a tag to compare

Patch Changes

  • #6081 90d9b58 Thanks @angrykoala! - Fix missing authentication rules for interfaces in aggregate fields in connections.

@neo4j/[email protected]

14 Mar 10:50
b46aa81
Compare
Choose a tag to compare

Patch Changes

@neo4j/[email protected]

14 Mar 13:20
98969a0
Compare
Choose a tag to compare
Pre-release

Major Changes

  • #6048 c667618 Thanks @darrellwarde! - Subscriptions are now an opt-in feature which can be enabled by using the @subscription directive on either schema or type.

    For example, to enable subscriptions for the whole schema (equivalent to before this breaking change):

    type Movie @node {
        title: String!
    }
    
    extend schema @subscription

    To enable subscriptions just for the Movie type:

    type Movie @node @subscription {
        title: String!
    }
  • #6077 4cf7c07 Thanks @darrellwarde! - Values specified within the @coalesce directive are now also returned when selecting those fields, and not just when those fields are used in a filter.

  • #6027 fd7d373 Thanks @angrykoala! - Remove deprecated fields *aggregate in favor of the aggregate field in connections. Remove option deprecatedAggregateOperations from the excludeDeprecatedFields setting.

Minor Changes

  • #6024 2318336 Thanks @MacondoExpress! - Aggregations filters are moved to the connection input field.

    Current aggregation filters:

    {
        posts(where: { likesConnection: { aggregate: { node: { someInt: { average: { eq: 10 } } } } } }) {
            content
        }
    }

    Deprecated aggregation filters:

    {
        posts(where: { likesAggregate: { node: { someInt: { average: { eq: 10 } } } } }) {
            content
        }
    }
  • #6024 2318336 Thanks @MacondoExpress! - The aggregation filter count now supports both, nodes and relationships.

    Count filter on nodes:

    {
        posts(where: { likesConnection: { aggregate: { count: { nodes: { eq: 2 } } } } }) {
            title
            likes {
                name
            }
        }
    }

    Count filter on edges:

    {
        posts(where: { likesConnection: { aggregate: { count: { edges: { eq: 2 } } } } }) {
            title
            likes {
                name
            }
        }
    }

Patch Changes

  • #6024 667e75c Thanks @MacondoExpress! - Following the changes of moving aggregations inside the connection fields,
    the previous aggregations filters outside the connection filters are now deprecated.

    The flag aggregationFiltersOutsideConnection has been added to the excludeDeprecatedFields setting.

    const neoSchema = new Neo4jGraphQL({
        typeDefs,
        features: { excludeDeprecatedFields: { aggregationFiltersOutsideConnection: true } },
    });
  • #6000 271a0a3 Thanks @MacondoExpress! - Add addVersionPrefix to cypherQueryOptions in context to add a Cypher version with CYPHER 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/[email protected]

13 Mar 16:19
6bb4f7c
Compare
Choose a tag to compare

Patch Changes

  • #6079 7e9a0bd Thanks @angrykoala! - Fix edge filtering for aggregate fields inside connections.

    Previously, the following query would aggregate all the movies named The Matrix, ignoring the edge filter

    query {
        actors {
            moviesConnection(where: { edge: { screentime_EQ: 19 }, node: { title_EQ: "The Matrix" } }) {
                aggregate {
                    node {
                        title {
                            longest
                        }
                    }
                }
            }
        }
    }

@neo4j/[email protected]

10 Mar 14:42
5ab5a54
Compare
Choose a tag to compare

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.g actedInAggregate) in favor of the field aggregate inside the connection (e.g actedInConnection -> 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 } },
    });