Skip to content

Cannot query field "status" on type "Query". #385

@traumschule

Description

@traumschule

Problem

Following #373
The public orion archive graphql endpoint doesn't answer the query { status { head } } in the expected format.
This is also true for the endpoints maintained by lezek:

The same is true for the squid archive:

Image

Rationale

The archive takes more than 60 GB storage. Can orion run with external archive node?

$ du -ms /var/lib/docker/volumes/*
61428 /var/lib/docker/volumes/archive_orion_archive_db_data

With orion/.env

CUSTOM_ARCHIVE_GATEWAY_URL=https://orion.l1.media/archive/graphql
ARCHIVE_GATEWAY_URL=${CUSTOM_ARCHIVE_GATEWAY_URL:-http://orion_archive_gateway:${GATEWAY_PORT}/graphql}

$ cd orion/; make down-archive
$ docker compose up -d orion_processor

{"level":2,"time":1768751366506,"ns":"sqd:processor","msg":"processing blocks from 16277680"}
{"level":5,"time":1768751366693,"ns":"sqd:processor","err":{
"response":{"status":400,"headers":[["access-control-allow-credentials","true"],["connection","keep-alive"],["content-length","1058"],["content-type","application/json; charset=utf-8"],["date","Sun, 18 Jan 2026 15:49:26 GMT"],["etag","W/"422-pRRdFLPwpEhJYYVemVMq7KEh38Q""],["server","nginx"],["vary","Origin"],["x-powered-by","Express"]],"body":{
"errors":[{"message":"Cannot query field "status" on type "Query". Did you mean "sales"?","extensions":{"code":"GRAPHQL_VALIDATION_FAILED","exception":{
"stacktrace":["GraphQLError: Cannot query field "status" on type "Query". Did you mean "sales"?","
at Object.Field (/orion/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js:48:31)","
at Object.enter (/orion/node_modules/graphql/language/visitor.js:323:29)","
at Object.enter (/orion/node_modules/graphql/utilities/TypeInfo.js:370:25)","
at visit (/orion/node_modules/graphql/language/visitor.js:243:26)","
at validate (/orion/node_modules/graphql/validation/validate.js:69:24)","
at validate (/orion/node_modules/apollo-server-core/dist/requestPipeline.js:188:39)","
at processGraphQLRequest (/orion/node_modules/apollo-server-core/dist/requestPipeline.js:99:38)","
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","
at async processHTTPRequest (/orion/node_modules/apollo-server-core/dist/runHttpQuery.js:222:30)"]}}}]},"url":"https://orion.l1.media/archive/graphql"},
"archiveQuery":"query { status { head } }",
"stack":"HttpError: Got 400 from https://orion.l1.media/archive/graphql\n
at ArchiveClient.request (/orion/node_modules/@subsquid/util-internal-http-client/lib/client.js:45:27)\n
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n
at async ArchiveClient.graphqlRequest (/orion/node_modules/@subsquid/util-internal-http-client/lib/client.js:268:19)\n
at async Ingest.fetchArchiveHeight (/orion/node_modules/@subsquid/substrate-processor/lib/ingest.js:228:19)\n
at async Runner.run (/orion/node_modules/@subsquid/substrate-processor/lib/processor/runner.js:105:37)"}}
make: *** [Makefile:2: process] Error 1

Triage

The documentation suggests that

Orion will use Joystream mainnet blockchain archive gateway hosted by Subsquid [no longer available]
If you wish, you can set a different Subsquid archive endpoint by changing the value of the ARCHIVE_GATEWAY_URL variable in the .env file.

The default fallback is to query the internal archive gateway at http://orion_archive_gateway:${GATEWAY_PORT}/graphql with GATEWAY_PORT=8000 which is a PG cluster provided by docker:

127.0.0.1:8888->8000/tcp, ::1:8888->8000/tcp orion_archive_gateway
postgres://postgres:postgres@orion_archive_db:${DB_PORT}/squid-archive

The exporer is exposed on port 4444. config

0.0.0.0:4444->3000/tcp, :::4444->3000/tcp orion_archive_explorer

orion.l1.media is hosting a full archive exposed publicly:

server {
    listen 443 ssl;
    http2 on;
    server_name orion.l1.media;

    location /archive/ {
      rewrite /archive/(.+) /$1 last;
      proxy_pass http://localhost:8888;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_set_header Host $http_host;
    }

    location /archive/explorer {
      rewrite /archive/explorer/(.*) /$1 last;
      proxy_pass http://localhost:4444;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_set_header Host $http_host;
    }

However both fail above query:

Turns out the correct query is:

{
  squidStatus {
    height
  }
}

{
  "data": {
    "squidStatus": {
      "height": 16277679
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions