To establish a connection between two user contexts, an invitation should be created. First, need to get the list of available user contexts. To do this, use getPossibleUserConnections query. It returns the list of user contexts who can be invited to join the current user’s network. Results will be returned with pagination and sorted by the name (ascending by default, the order can be reversed). The same pagination approach as in other queries is used (for example, getCatalogData). The following arguments can be used in the query:
ArgumentTypeDescriptionDefault
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.
reverseBooleanAllows to change the order of the sorting to DESC.FALSE
nameStringProvides the possibility to filter by the user context name. Note: it makes sense only if the real user name is sent to Opigno API during the user context synchronization.
  query getPossibleUserConnections {
    getPossibleUserConnections(first: 2, after: "TzozMzoiRHJ1cGFsXG9waWdub19hcGlcV3JhcHBlcnNcQ3Vyc29yIjo0OntzOjE0OiIAKgBiYWNraW5nVHlwZSI7czoxNDoib3BpZ25vX2NvbnRleHQiO3M6MTI6IgAqAGJhY2tpbmdJZCI7aToxNjA2O3M6MTA6IgAqAHNvcnRLZXkiO3M6NToibGFiZWwiO3M6MTI6IgAqAHNvcnRWYWx1ZSI7czoyMDoiYWxpbmFfdGVzdF8xIG9waWdubzQiO30=") {
      edges {
        node {
          userContext {
            id
            uuid
          }
          cta {
            actionId
            title
            arguments {
              key
              value
            }
            metadata {
              key
              value
            }
          }
        }
      }
      pageInfo {
        hasNextPage
        startCursor
        endCursor
      }
      totalItems
    }
  }