我安装了hasura,我想发送关于hasura云项目的数据。我尝试过不同的方式来启动hasura控制台,但我没有找到启动它的好方法。每次我有相同的错误,我不知道如何解决它。
您可以在我的项目中看到我的Hasura配置文件和错误。
INFO possible reasons:
INFO 1) Provided root endpoint of graphql-engine server is wrong. Verify endpoint key in config.yaml or/and value of --endpoint flag
INFO 2) Endpoint should NOT be your GraphQL API, ie endpoint is NOT https://hasura-cloud-app.io/v1/graphql it should be: https://hasura-cloud-app.io
INFO 3) Server might be unhealthy and is not running/accepting API requests
INFO 4) Admin secret is not correct/set
INFO
FATA[0002] making http request failed: Get "http://localhost:8080/healthz": dial tcp [::1]:8080: connect: connection refused


谢谢
发布于 2022-02-02 12:35:50
决议:
当我们使用阿波罗客户端时,我们需要像这样在客户机中设置标题:
const client = new ApolloClient({
uri: "https://yourapp.hasura.app/v1/graphql",
cache: new InMemoryCache(),
headers: {
"content-type": "application/json",
"x-hasura-admin-secret":
"",
},
});这解决了我的问题
发布于 2022-11-09 11:28:01
我有两个版本的hasura,一个安装了curl,另一个安装了npm。
我通过删除所有版本并安装带有npm的hasura-cli并重新启动系统来解决这个问题。
https://stackoverflow.com/questions/70952239
复制相似问题