Stargaze API
Last updated
Last updated
import { ApolloClient, InMemoryCache, gql } from '@apollo/client';
const client = new ApolloClient({
uri: 'https://graphql.mainnet.stargaze-apis.com/graphql',
cache: new InMemoryCache(),
});
const getTraitsAndOwner = (collectionAddr, tokenId) =>
client.query({
query: gql`
query Query {
token(
collectionAddr: "${collectionAddr}"
tokenId: "${tokenId}"
) {
traits {
name
value
}
owner {
address
name {
name
}
}
}
}
`,
});