Ever Platform
RoadmapIdeasDeveloper ToolsSDK
  • About Ever Platform
  • Sandbox endpoint
  • Quick Start
  • Use cases
    • Infrastructure Provider
      • Projects
    • Community-driven development
      • Roadmap
        • Discussions
      • Your ideas
      • DevNet Giver(Faucet)
    • Custom development
      • Our clients
  • Products
    • Evercloud
      • Networks Endpoints
      • Get Started
      • GraphQL API documentation
      • Testnet Faucets
      • About data proofs in Cloud
      • SLA
      • HTTP notifications
    • Dedicated Cloud/Node
    • Dapp Server (DS)
    • Simple Emulator (SE)
      • Endpoint
    • Network Emulator (NE)
    • Functionality comparison
  • Samples
    • GraphQL Samples
      • Send message
      • Network Config
      • Blocks
      • Accounts
      • Transactions
      • Messages
      • Block and Transaction Pagination: Best Practice
      • Multiple Message Processing and Monitoring
      • Subscribe for REMP receipts
  • Reference
    • GraphQL API
      • Quick Start
      • Samples
      • Networks
      • Explore Playground
      • Connect to GraphQL API
      • Schema
      • Blockchain API
      • Info API
      • Query Collections: Query Language
      • Subscribe Collections
      • Message Monitor API
      • Field Descriptions
    • Evercloud API Add-ons
      • Query cost
      • Blockchain Statistics
      • FT (Fungible Token) API
      • Price
      • Counterparties
      • Flex API
    • Changelog
      • Evercloud
      • Dapp Server (DS)
      • Simple Emulator (SE)
    • Breaking changes
      • Policy
      • Deprecation schedule
      • Migration guides
        • GraphQL API 1.0 migration
  • SDK and tools
    • everdev
    • Client Libraries
  • Guides
    • How to connect to GraphQL API
  • 😊Social
    • Feedback page
    • Telegram
    • Discord
Powered by GitBook
On this page
  • Playground
  • Documentation
  • Request with curl
  • Request with SDK (JavaScript)

Was this helpful?

  1. Reference
  2. GraphQL API

Quick Start

Learn playground, documentation, make your first request and integrate

PreviousGraphQL APINextSamples

Last updated 2 years ago

Was this helpful?

Let's start with observing API in sandbox playground.

Learn how to read API documentation.

Then move to making an api request with curl.

And integrate it with ever-sdk.

Playground

Go to GraphQL playground

Insert this query in the left part.

query{
blockchain{
    account(address:"-1:3333333333333333333333333333333333333333333333333333333333333333"){
      info{
        balance(format:DEC)
        address
      }
    }
  }
}

Now click play button and you will see the result:

Documentation

Click on the button "schema" on the right. You will see the API documentation with all available fields. Try to make your own query now.

Request with curl

curl --location --request POST 'https://devnet-sandbox.evercloud.dev/graphql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query($address: String!){\n  blockchain{\n    account(address:$address){\n      info{\n        balance(format:DEC)\n      }\n    }\n  }\n}","variables":{"address":"0:3333333333333333333333333333333333333333333333333333333333333333"}}'

Request with SDK (JavaScript)

const {TonClient} = require("@eversdk/core");
const {libNode} = require("@eversdk/lib-node");

TonClient.useBinaryLibrary(libNode)

const client = new TonClient({
    network: {
        endpoints: [
            "https://devnet-sandbox.evercloud.dev/graphql"
        ],
    },
});

(async () => {
    try {
        // Get account balance. 
        const query = `
            query {
              blockchain {
                account(
                  address: "${address}"
                ) {
                   info {
                    balance(format: DEC)
                  }
                }
              }
            }`
        const {result}  = await client.net.query({query})
        console.log(`The account balance is ${result.data.blockchain.account.info.balance}`);
        client.close();
    }
    catch (error) {
        console.error(error);
    }
}
)()
https://devnet-sandbox.evercloud.dev/graphql
В