Skip to content

Instantly share code, notes, and snippets.

@symbiont-eric-torreborre
Last active March 30, 2022 09:09
Show Gist options
  • Select an option

  • Save symbiont-eric-torreborre/0af0d6d39540929a70da10ddc36ea58e to your computer and use it in GitHub Desktop.

Select an option

Save symbiont-eric-torreborre/0af0d6d39540929a70da10ddc36ea58e to your computer and use it in GitHub Desktop.
Test graphql
  1. start a mock network
> export NUM_NODES=1
> bazel run //src/assembly-dev:stop_mock_network
  1. create 2 key aliases
curl -X POST http://127.0.0.1:32100/api/v1/key_aliases\?sync\=true
curl -X POST http://127.0.0.1:32100/api/v1/key_aliases\?sync\=true
  1. open an interactive graphql session at https://www.graphqlbin.com/v2

  2. enter the graphql endpoint http://127.0.0.1:32100/api/v1/graphql (use the mock network port)

  3. run a query to get the key aliases:

query Default  {
    keyAliases(first: 200, tx_index: "2") {
      edges {
        node {
          id
        }
      }
    }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment