I am not able to send a POST request to my Hasura endpoint from my Flutter client and even from POSTMAN.
Here is my current error:
{"errors":[{"extensions":{"path":"$","code":"invalid-json"},"message":"Error in $: not enough input"}]}
I added endpoint my_endpoint/v1/graphql
and HASURA_GRAPHQL_ADMIN_SECRET
which I set in Heroku dashboard. ( This value now shows up on my deployed herokuapp console)
My client is using ferry-graphql like this
Client initClient(String url, String secret) {
final link = HttpLink(
url,
defaultHeaders: {
'x-hasura-admin-secret': secret,
},
);
final cache = Cache();
final client = Client(
link: link,
cache: cache,
);
return client;
}
I am not sure what else I should add for my client request header to access hasura.