We currently only support passing in a single sort value. If you pass in multiple, your results may vary or be inconsistent. A good example (and the default for the table in our UI) can be found below:
{ createdAt:'DESC' }
Where Types & Examples
The types for our where clause parameter is as follows:
This list is evolving, and some might even be missing, but the pattern should be fairly clear for our queries moving forward. Note that it is a recursive structure, but deeply nesting filters will slow down the query. We do not make any specific performance guarantees. Here are a few examples:
// Finds all contacts in your account that have a wallet balance greater than 1 ETH// and have XMTP (wallet messaging) enabled.{ where: { AND: [ { balance_gt:1 }, { xmtpEnabled_eq:true } ] }}// NFT filters are a special case for our recursive AND/OR/NOT stucture. This// will find all contacts in your account that own a Gold BoredApeYachtClub or// a Cosmic Moonbirds.{ where: { OR: [ { AND_nft: [ { contractAddress_eq:"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" }, { trait_eq: { id:"<our internal id for Fur from traits query>", value:"Solid Gold" } }, { amount_gt:0 } ] }, { AND_nft: [ { contractAddress_eq:"0x23581767a106ae21c074b2276d25e5c3e136a68b" }, { trait_eq: { id:"<our internal id for Body from traits query>", value:"Cosmic" } }, { amount_gt:0 } ] } ] }}
Need Help?
This is a complex query, so it is hard to account for every edge case in our documentation. If you find yourself trying to figure something out but it just isn't working, please reach out and let us know!