The full list of the community members can be retrieved by calling getCommunityMembers query. The results will be returned with pagination and possibility to change the sorting order (by default the query results are sorted by the user context label, ascending). The query supports cursor-based pagination (after, before) or limit-based (first, last).
Query results will be returned only for the user associated with the given community (the owner or a member) or for users associated with the ADMINISTRATOR scope.
The query accepts the following arguments:
ArgumentTypeDescriptionDefault
communityIdIdRequired. ID of the community to get the list of members.
afterCursorReturns results that come after the specified cursor. Should be used together with first parameter. Cannot be used if before is set.
beforeCursorReturns results that come before the specified cursor. Should be used together with last parameter. Cannot be used if after is set.
firstIntegerReturns up to the first N elements from the list. Required if after parameter is set. Cannot be used together with last.
lastIntegerReturns up to the first N elements from the list. Required if before parameter is set. Cannot be used together with first.
reverseBooleanReverse the order of the underlying list. Default sort order is ascending, by the user context label.false
nameStringAllows to search by the member user context label. Note: it makes sense only if the real user name is sent to Opigno Enterprise API during the user context synchronization.
  query getCommunityMembers {
    getCommunityMembers(communityId: 1, first: 2) {
      edges {
        node {
          id
          userContext {
            displayName
            id
            uuid
          }
          cta {
            actionId
            arguments {
              key
              value
            }
          }
        }
      }
      totalItems
    }
  }