Skip to content

Releases: neo4j/graphql

@neo4j/[email protected]

06 Jan 14:46
3c10304
Compare
Choose a tag to compare
Pre-release

Major Changes

Minor Changes

  • #5868 46ab2fa Thanks @angrykoala! - Add suport for generic update operators:

    mutation {
        updateMovies(update: { name: { set: "The Matrix" } }) {
            movies {
                id
                name
            }
        }
    }
  • #5873 17911fc Thanks @MacondoExpress! - Introduce a new style for filtering relationships and connections.
    The quantifiers SOME | NONE | SINGLE | ALL are now available as a nested input object.

    Relationship

    {
        movies(where: { genres: { some: { name: { equals: "some genre" } } } }) {
            actorCount
        }
    }

    Connection

    {
        movies(where: { genresConnection: { some: { node: { name: { equals: "some genre" } } } } }) {
            actorCount
        }
    }

Patch Changes

  • #5871 722c650 Thanks @angrykoala! - Deprecate individual mutations in favor of generic mutations

    • _SET
    • _POP
    • _PUSH
    • _INCREMENT
    • _ADD
    • _DECREMENT
    • _SUBTRACT
    • _MULTIPLY
    • _DIVIDE
  • #5882 7254acf Thanks @angrykoala! - Deprecates old aggregation filters for relationships in favor of more generic filters:

    Before:

    query Movies {
      movies(
        where: { actorsAggregate: { node: { lastRating_AVERAGE_GT: 6 } } }
      ) {
        title
      }
    }

    Now:

    query Movies {
      movies(
        where: {
          actorsAggregate: { node: { lastRating: { average: { gt: 6 } } } }
        }
      ) {
        title
      }
    }
  • #5897 4f3b068 Thanks @MacondoExpress! - Deprecate relationship filtering using the non-generic version such as actors_SOME: { title_EQ: "The Matrix" } in favor of the generic input actors: { some: { title: { eq: "The Matrix" } } }.
    The setting excludeDeprecatedFields now contains the option relationshipFilters to remove these deprecated filters.

  • #5897 917482b Thanks @MacondoExpress! - Deprecate attribute filtering using the non-generic version such as title_EQ: "The Matrix" in favor of the generic input title: { eq: "The Matrix" }.
    The setting excludeDeprecatedFields now contains the option attributeFilters to remove these deprecated filters.

  • #5879 5c7ba22 Thanks @angrykoala! - Add generic filters for aggregations:

    {
        posts(where: { likesAggregate: { node: { rating: { average: { eq: 3.2 } } } } }) {
            title
        }
    }
  • #5882 7254acf Thanks @angrykoala! - Introduce the flag "aggregationFilters" to remove deprecated aggregation filters:

    const neoSchema = new Neo4jGraphQL({
        typeDefs,
        features: { excludeDeprecatedFields: { aggregationFilters: true } },
    });

@neo4j/[email protected]

20 Dec 09:46
abae3a9
Compare
Choose a tag to compare

Patch Changes

  • #5904 64d4da1 Thanks @a-alle! - Fix error message for wrong requireAuthentication argument on @authorization directive

  • #5906 80df6f3 Thanks @Masadow! - Fixed a bug that appears when filtering on interface relationships

@neo4j/[email protected]

20 Dec 09:29
16bea3a
Compare
Choose a tag to compare

Patch Changes

  • #5890 f7358d0 Thanks @Masadow! - Fixed a bug that appears when filtering on interface relationships

  • #5901 06478b8 Thanks @a-alle! - Fix error message for wrong requireAuthentication argument on @authorization directive

@neo4j/[email protected]

20 Dec 09:29
16bea3a
Compare
Choose a tag to compare

Patch Changes

@neo4j/[email protected]

20 Dec 15:06
e1da36b
Compare
Choose a tag to compare
Pre-release

Major Changes

Patch Changes

  • #5837 721691a Thanks @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.

@neo4j/[email protected]

20 Dec 15:06
e1da36b
Compare
Choose a tag to compare
Pre-release

Major Changes

  • #5899 7335d8f Thanks @darrellwarde! - Nested mutation operations now follow the relationship direction behaviour as defined in queryDirection

  • #5872 925ad8d Thanks @angrykoala! - Remove @private directive. This directive was intended to be used with the library @neo4j/graphql-ogm which is no longer supported.

  • #5895 6afcadd Thanks @angrykoala! - Fails schema generation if there are conflicting plural names in types. For example, the following schema will fail, due to ambiguous Techs plural

    type Tech @node(plural: "Techs") {
        name: String
    }
    
    type Techs {
        value: String
    }
  • #5755 9c75f92 Thanks @angrykoala! - Remove support for connectOrCreate operations

  • #5778 56022ba Thanks @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 ac1fa62 Thanks @angrykoala! - Single element relationships have been removed in favor of list relationships:

    Before

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

    After

    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:

    type Movie {
        director: Person
            @cypher(
                statement: """
                MATCH(this)-[:ACTED_IN]->(p:Person)
                RETURN p
                """
                columnName: "p"
            )
    }
  • #5762 87e416b Thanks @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.

    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:

    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:

    # Removed
    {
        movies(fulltext: { movieTitleIndex: { phrase: "The Matrix" } }) {
            title
        }
    }

    The following form as a root-level query has been changed:

    # 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 d8d59f8 Thanks @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 95ce8bb Thanks @darrellwarde! - Implicit filtering fields have been removed, please use the explicit versions:

    # 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 9c75f92 Thanks @angrykoala! - Remove support for @unique directive

  • #5768 e338590 Thanks @angrykoala! - Remove overwrite field in connect operations

  • #5777 0ecfd71 Thanks @darrellwarde! - The deprecated options argument has been removed.

    Consider the following type definitions:

    type Movie {
        title: String!
    }

    The migration is as below:

    # 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 99cb9aa Thanks @darrellwarde! - Implicit set operations have been removed. For example:

    # 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 1a07d40 Thanks @darrellwarde! - The Neo4j GraphQL Library and Introspector now required Node.js 22 or greater.

Patch Changes

  • #5837 721691a Thanks @MacondoExpress! - Added a validation rule to avoid defining fields as lists of nullable elements, as Neo4j does not support this.

@neo4j/[email protected]

16 Dec 14:26
03ac2b6
Compare
Choose a tag to compare

Patch Changes

@neo4j/[email protected]

16 Dec 14:25
48f170f
Compare
Choose a tag to compare

Patch Changes

@neo4j/[email protected]

16 Dec 14:26
03ac2b6
Compare
Choose a tag to compare

Patch Changes

  • #5888 3037bb9 Thanks @darrellwarde! - Fix discrepancy of relationship direction when filtering

  • #5869 34725f6 Thanks @angrykoala! - Deprecates @private directive. The private directive was aimed to be used in conjunction with the OGM, which is no longer supported.

  • #5888 3037bb9 Thanks @darrellwarde! - Fix incorrect relationship direction when performing a delete operation nested under a delete operation

@neo4j/[email protected]

16 Dec 14:25
48f170f
Compare
Choose a tag to compare

Patch Changes

  • #5889 b125790 Thanks @darrellwarde! - Fix incorrect relationship direction when performing a delete operation nested under a delete operation