Skip to content
This documentation is in beta, and weโ€™re looking for feedback. See how you can contribute ๐ŸŒŸ

Example Queries

Query All Tokens Owned by a Specific Address

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

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

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.

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