Skip to content

v2.0.2

Compare
Choose a tag to compare
@neo4j-team-graphql neo4j-team-graphql released this 27 Nov 13:53
· 57 commits to main since this release
545088d

Patch Changes

  • #463 57a3f9c Thanks @angrykoala! - Fix order of set remove subclauses. The generated cypher will now maintain the order of multiple SET and REMOVE statements.

    For example:

    const matchQuery = new Cypher.Match(new Cypher.Pattern(personNode, { labels: ["Person"] }))
        .where(personNode, { name: nameParam })
        .set([personNode.property("name"), evilKeanu])
        .remove(personNode.property("anotherName"))
        .set([personNode.property("anotherName"), new Cypher.Param(nameParam)])
        .set([personNode.property("oldName"), new Cypher.Param(nameParam)])
        .return(personNode);

    Before

    MATCH (this0:Person)
    WHERE this0.name = $param0
    SET
        this0.name = $param1
        this0.anotherName = $param2,
        this0.oldName = $param3
    REMOVE this0.anotherName
    RETURN this0

    After

    MATCH (this0:Person)
    WHERE this0.name = $param0
    SET
        this0.name = $param1
    REMOVE this0.anotherName
    SET
        this0.anotherName = $param2,
        this0.oldName = $param3
    RETURN this0