Skip to content

Latest commit

 

History

History
62 lines (54 loc) · 1.3 KB

V1_update_space.md

File metadata and controls

62 lines (54 loc) · 1.3 KB
copyright link is
Copyright IBM Corp. 2017
update-space-details
published

Update space details

Is your space in need of a change? Take a look as this simple GraphQL mutation to update the space title:

mutation updateSpaceTitle {
  updateSpace(input: { id: "space-id", title: "Space title",  members: ["user3-id", "user4-id"]}){
    space {
      title
    }
  }
}

Add Members

Get the conversation rolling by adding more members. Combine the list of IDs of the new members along with the memberOperation ADD;

mutation updateSpaceAddMembers {
  updateSpace(input: { id: "space-id", title: "Space title",  members: ["user3-id", "user4-id"], memberOperation: ADD}){
    memberIdsChanged
    space {
      title
      membersUpdated
      members {
        items {
          email
          displayName
        }
      }
    }
  }
}

Remove Members

Space feeling a little crowded? Remove IDs of members using the memberOperation REMOVE

mutation updateSpaceRemoveMembers {
  updateSpace(input: { id: "space-id", title: "Space title",  members: ["user3-id", "user4-id"], memberOperation: REMOVE}){
    memberIdsChanged
    space {
      title
      membersUpdated
      members {
        items {
          email
          displayName
        }
      }
    }
  }
}