Skip to content

Relationships can be updated on nested connection when settable is false #6118

Open
@angrykoala

Description

@angrykoala

This issue is a follow up from #5012 Nested connect operations for relationships that are not settable on one side but settable on the other allow for nested connections:

    type Identifier @node {
        value: String!

        identifierType: [IdentifierType!]!
            @relationship(
                type: "HAS_IDENTIFIER_TYPE"
                direction: OUT
                nestedOperations: [CONNECT, DISCONNECT]
                aggregate: false
            )
            @selectable(onRead: true, onAggregate: false)
            @settable(onCreate: true, onUpdate: false)
            @filterable(byValue: true, byAggregate: false)
    }

    type IdentifierType @node {
        name: String!
        ofIdentifier: [Identifier!]! @relationship(type: "HAS_IDENTIFIER_TYPE", direction: IN)
    }
mutation UpdateIdentifierTypes {
  updateIdentifierTypes(
    update: {
      ofIdentifier: [
        {
          connect: {
            where: { node: { value: { eq: "something" } } }
            connect: {
              identifierType: {
                where: { node: { name: { eq: "IdentifierType" } } }
              }
            }
          }
        }
      ]
    }
  ) {
    identifierTypes {
      name
    }
  }
}

Note that the second connect is available from identifierType which shouldn't be settable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconfirmedConfirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions