website logo
Join the CommunityContact Us
Navigate through spaces
⌘K
Palm Network Developer Portal
The Palm Network
Submit an Article
Network Details
Validators
Network Update
Transition runbook
Testing
JSON-RPC API changes
Validators
Self-hosted nodes
Developer updates
FAQs
Support
Get Started
Get PALM Tokens
Gas Fees
Connect to Palm network
Run a Transaction Node
How To Tutorials
MetaMask Wallet Setup
Deploy NFT Contracts
Verifying NFT Contracts
Mint NFTs with Hardhat
Bridge
Use the Bridge
Integrate With the Bridge
Bridge Component Addresses
Deprecated
Use Supported Tools
Block Explorer
Moralis
Palm Safe
The Graph
Covalent API
Docs powered by
Archbee
Use Supported Tools
The Graph

Example Queries

7min



Query All Tokens Owned by a Specific Address



GraphQL
Curl
|
query {
    owners(where: {
        id: "0x7a7b2502ff8d0fb68f40baba7ded01ca7fa7aa14"
    }) {
        id
        tokens(first: 2 where: {
            tokenURI: "https://bafkreifvtwuiypleu4vv7edh4zclmymp5ixh44xxmd3hb2imiqa7mp2c3a.ipfs.dweb.link/"
        }) {
            id
            tokenURI
            contract {
                name
                symbol
            }
        }
        numTokens
    }
}





Query All Tokens Owned by a Specific Address and Minted by a Given Contract



GraphQL
Curl
|
query {
    owners(where: {
        id: "0x7a7b2502ff8d0fb68f40baba7ded01ca7fa7aa14"
    }) {
        id
        tokens(first: 2 where: {
            tokenURI: "https://bafkreifvtwuiypleu4vv7edh4zclmymp5ixh44xxmd3hb2imiqa7mp2c3a.ipfs.dweb.link/"
        }) {
            id
            tokenURI
            contract {
                name
                symbol
            }
        }
        numTokens
    }
}





Query the First Two Tokens Owned by the Same Address and With Similar Metadata URI



GraphQL
Curl
|
query {
    owners(where: {
        id: "0x7a7b2502ff8d0fb68f40baba7ded01ca7fa7aa14"
    }) {
        id
        tokens(first: 2 where: {
            tokenURI: "https://bafkreifvtwuiypleu4vv7edh4zclmymp5ixh44xxmd3hb2imiqa7mp2c3a.ipfs.dweb.link/"
        }) {
            id
            tokenURI
            contract {
                name
                symbol
            }
        }
        numTokens
    }
}





Query the First 10 Tokens Minted With a Given Contract

When used as a search parameter, all id address values must be in lower case.

GraphQL
Curl
|
query {
    owners(where: {
        id: "0x7a7b2502ff8d0fb68f40baba7ded01ca7fa7aa14"
    }) {
        id
        tokens(first: 2 where: {
            tokenURI: "https://bafkreifvtwuiypleu4vv7edh4zclmymp5ixh44xxmd3hb2imiqa7mp2c3a.ipfs.dweb.link/"
        }) {
            id
            tokenURI
            contract {
                name
                symbol
            }
        }
        numTokens
    }
}




Updated 13 Sep 2023
Did this page help you?
PREVIOUS
Mint NFTs Tutorial
NEXT
Covalent API
Docs powered by
Archbee
TABLE OF CONTENTS
Query All Tokens Owned by a Specific Address
Query All Tokens Owned by a Specific Address and Minted by a Given Contract
Query the First Two Tokens Owned by the Same Address and With Similar Metadata URI
Query the First 10 Tokens Minted With a Given Contract
Docs powered by
Archbee