đŸ‘ŦCheck Multiple Users

Learn how to use Airstack to check if multiple users have XMTP or not.

To check multiple users if they have XMTP is similar to checking for single users.

Swap _eq comparator with _in to allow array inputs:

query MyQuery($addresses: [Identity!]) {
  XMTPs(input: {blockchain: ALL, filter: {owner: {_in: $addresses}}}) {
    XMTP {
      isXMTPEnabled
      owner {
        addresses
        domains {
          name
        }
        socials {
          dappName
          profileName
        }
      }
    }
  }
}

The response will return fewer amount of element in the XMTP array if some of the owner input has no XMTP.

Therefore, you can use owner field response to double check if in more details if a specific user has XMTP or not.

Bulk Check Lens Profiles Have XMTP

Try Demo

Code

query BulkFetchLensProfilesHaveXMTP($lens: [Identity!]) {
  XMTPs(input: {blockchain: ALL, filter: {owner: {_in: $lens}}, limit: 100}) {
    XMTP {
      isXMTPEnabled
      owner {
        socials {
          dappName
          profileName
        }
      }
    }
    pageInfo {
      nextCursor
      prevCursor
    }
  }
}

Bulk Check Farcasters Have XMTP

Try Demo

Code

query BulkFetchFarcasterHaveXMTP($farcaster: [Identity!]) {
  XMTPs(input: {blockchain: ALL, filter: {owner: {_in: $farcaster}}, limit: 100}) {
    XMTP {
      isXMTPEnabled
      owner {
        socials {
          dappName
          profileName
        }
      }
    }
    pageInfo {
      nextCursor
      prevCursor
    }
  }
}

Last updated

#300: add-user-details

Change request updated