-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Query root type must be provided. #281
Comments
@vae520283995 |
EnvironmentThe CLI can be used to gather generic information about your system to assist with support. npx @cardano-graphql/cli system-info Alternatively, what release or Git revision are you using: git version 2.7.4 Platform
Platform version: Linux version 4.4.0-1092-aws (buildd@lgw01-amd64-030) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ) #103-Ubuntu SMP Tue Aug 27 10:21:48 UTC 2019 Runtime
Runtime version: node -v
docker version Docker version 19.03.5, build 633a0ea838 docker-compose version 1.25.0, build 0a186604 Steps to reproduce the bugExecute according to this document root@ip-172-31-38-92:/home/ubuntu# curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardanoDbMeta { initialized syncPercentage }}"}' http://localhost:3100/graphql
{"data":{"cardanoDbMeta":{"initialized":true,"syncPercentage":100}}}
root@ip-172-31-38-92:/home/ubuntu# curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardano { tip { number slotNo epoch { number } } } }"}' http://localhost:3100/graphql
{"errors":[{"message":"Error: Query root type must be provided.","locations":[{"line":1,"column":3}],"path":["cardano"],"extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"stacktrace":["Error: Error: Query root type must be provided."," at Object. (/application/packages/api-cardano-db-hasura/dist/executableSchema.js:78:35)"," at Generator.next ()"," at /application/packages/api-cardano-db-hasura/dist/executableSchema.js:8:71"," at new Promise ()"," at __awaiter (/application/packages/api-cardano-db-hasura/dist/executableSchema.js:4:12)"," at cardano (/application/packages/api-cardano-db-hasura/dist/executableSchema.js:63:63)"," at field.resolve (/application/node_modules/graphql-extensions/dist/index.js:134:26)"," at field.resolve (/application/node_modules/apollo-server-core/dist/utils/schemaInstrumentation.js:52:26)"," at resolveFieldValueOrError (/application/node_modules/graphql/execution/execute.js:467:18)"," at resolveField (/application/node_modules/graphql/execution/execute.js:434:16)"]}}}],"data":null} What is the expected behavior?root@ip-172-31-38-92:/home/ubuntu# curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardano { tip { number slotNo epoch { number } } } }"}' http://localhost:3100/graphql
{ "data": { "cardano": { "tip": { "number": 4391749, "slotNo": 4393973, "epoch": { "number": 203 } } } } } |
with the stack running, please run |
|
The reason for the warning is that I customize the container name and data directory |
|
@rhyslbw hello,I have 2 nodes that can't synchronize. Is there any group under discussion, such as telegram |
|
Hi @vae520283995 |
Unable to synchronize is the reason for cardano-node,Even if I update the latest version, it doesn't work |
Best to try from a clean state with:
To achieve this without removing the existing volumes, |
cardano-db-sync-mainnet inputoutput/cardano-db-sync 3.1.0 08e2fc63f973 1.003 GB |
@rhyslbw {"level":"info","msg":"Applying migrations...","time":"2020-08-20T09:27:12Z"} {"level":"info","msg":"Applying migrations...","time":"2020-08-20T09:27:13Z"} Command failed: hasura --skip-update-check --project /application/packages/api-cardano-db-hasura/hasura/project --endpoint http://hasura:8080 migrate apply --up all Applying PostgreSQL schema and Hasura metadata: Attempt 9 of 10, retying... |
@vae520283995 |
I get the same error as above, is there a solution? /git/cardano-graphql$ docker-compose images
|
No solution, I think this is a cardano-grapql problem, I am waiting for the next release |
check Hasura schema matches expected shape, as on initial startup, a race condition exists with the metadata application Closes #281
root@ip-172-31-38-92:/home/ubuntu# curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardanoDbMeta { initialized syncPercentage }}"}' http://localhost:3100/graphql
{"data":{"cardanoDbMeta":{"initialized":true,"syncPercentage":100}}}
root@ip-172-31-38-92:/home/ubuntu# curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardano { tip { number slotNo epoch { number } } } }"}' http://localhost:3100/graphql
{"errors":[{"message":"Error: Query root type must be provided.","locations":[{"line":1,"column":3}],"path":["cardano"],"extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"stacktrace":["Error: Error: Query root type must be provided."," at Object. (/application/packages/api-cardano-db-hasura/dist/executableSchema.js:78:35)"," at Generator.next ()"," at /application/packages/api-cardano-db-hasura/dist/executableSchema.js:8:71"," at new Promise ()"," at __awaiter (/application/packages/api-cardano-db-hasura/dist/executableSchema.js:4:12)"," at cardano (/application/packages/api-cardano-db-hasura/dist/executableSchema.js:63:63)"," at field.resolve (/application/node_modules/graphql-extensions/dist/index.js:134:26)"," at field.resolve (/application/node_modules/apollo-server-core/dist/utils/schemaInstrumentation.js:52:26)"," at resolveFieldValueOrError (/application/node_modules/graphql/execution/execute.js:467:18)"," at resolveField (/application/node_modules/graphql/execution/execute.js:434:16)"]}}}],"data":null}
Did I do something wrong?
@rhyslbw
The text was updated successfully, but these errors were encountered: