KodaDot Query

KodaDot GraphQL Query for Kusama AssetHub

GraphQL

GraphQL is a query language for APIs. You can use it to request the exact data you need and nothing more. This limits the number of requests you need, making GraphQL more efficient and flexible to use.

GraphQL APIs are strongly typed, and the type system determines what data can be queried. You can use queries to request data and mutations to modify data.

To learn more about GraphQL, we recommend reading Introduction to GraphQL

Authentication

To communicate with the API authentication is required. The KodaDot Query uses API keys for request authentication. You can access and manage your API keys below.

Authentication to the API is performed by setting the Stellate-Api-Tokenheader to API key token for every request.

The KodaDot Query endpoint is located at https://query-stick.stellate.sh

API playground

Explore and learn KodaDot Query using GraphiQL. The playground is an interactive, in-browser application that can be used to explore the GraphQL API.Sign up or sign in to start exploring the GraphQL API.

Readme

Graphql Endpoints

  • https://query-stick.stellate.io/

Get NFTs by Account

Graphql queries to get list of NFTs by Account

query MyQuery {
  nftEntities(limit: 10, where: {currentOwner_eq: "DY4SQF2iD456tH89aQtz5wv1EV3BbSW8wKKuMcwbmXaj1pM"}) {
    id
    name
    meta {
      id
      image
      animationUrl
    }
  }
}

You can fetch POST request to our graphql endpoint.

With Javascript:

let headersList = {
"Content-Type": "application/json",
};
let gqlBody = {
query: `query MyQuery {
nftEntities(
limit: 10
where: {currentOwner_eq: "DY4SQF2iD456tH89aQtz5wv1EV3BbSW8wKKuMcwbmXaj1pM"}
) {
id
name
meta {
id
image
animationUrl
}
}
}`,
variables: "{}",
};
let bodyContent = JSON.stringify(gqlBody);
let response = await fetch("https://query-stick.stellate.io/", {
method: "POST",
body: bodyContent,
headers: headersList,
});
let data = await response.text();
console.log(data);

With CURL:

curl -X POST \
'https://query-stick.stellate.io/' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query MyQuery {\n nftEntities(\n limit: 10\n where: {currentOwner_eq: \"DY4SQF2iD456tH89aQtz5wv1EV3BbSW8wKKuMcwbmXaj1pM\"}\n ) {\n id\n name\n meta {\n id\n image\n animationUrl\n }\n }\n}","variables":"{}"}'

Get Single NFT

query MyQuery {
  nftEntityById(id: "6-5") {
    id
    name
    meta {
      id
      image
    }
  }
}

Describe your API with markdown

This query is amazing

You're even able to embed inline GraphiQLs to make your API easier to explore!

{
  this { is { a { query } } }
}

Any code tag works

import { request } from 'graphql-request'
const query = gql`
{
company {
ceo
}
roadster {
apoapsis_au
}
}
`
request('https://api.spacex.land/graphql/', query).then((data) => console.log(data))