Join Groups

This guide will help you manage Group membership on Lens.


Join a Group

Use the joinGroup mutation to join a Group with the logged-in account.

You MUST be authenticated as Account Owner or Account Manager to make this request.

mutation {  joinGroup(request: { group: "0x1234…" }) {    ... on JoinGroupResponse {      hash    }
    ... on SponsoredTransactionRequest {      ...SponsoredTransactionRequest    }
    ... on SelfFundedTransactionRequest {      ...SelfFundedTransactionRequest    }
    ... on TransactionWillFail {      reason    }  }}

Then, handle the result as explained in the Transaction Lifecycle guide.

Leave a Group

Use the leaveGroup mutation to leave a Group with the logged-in account.

You MUST be authenticated as Account Owner or Account Manager to make this request.

mutation {  leaveGroup(request: { group: "0x1234…" }) {    ... on LeaveGroupResponse {      hash    }
    ... on SponsoredTransactionRequest {      ...SponsoredTransactionRequest    }
    ... on SelfFundedTransactionRequest {      ...SelfFundedTransactionRequest    }
    ... on TransactionWillFail {      reason    }  }}

Then, handle the result as explained in the Transaction Lifecycle guide.