Skip to content

Message: x-hasura-admin-secret but not found, #96

Answered by ahmetcelikezer
mvltyldrmm asked this question in Q&A
Discussion options

You must be logged in to vote

I have had the same issue, and I solve it by passing these missing parameters to the header like below.

Create a round trip with your required tokens & credentials or etc. Then create an HTTP client using this Round Trip, this will add the header parameters, and you can edit your requests there.

You don't need the use oauth2 or other clients, the standard Go HTTP client is enough since Hasura API does not accept Bearer token I guess because even if you provide this token, it still asks for missing header parameters.

var client *graphql.Client

func init() {
	if client != nil {
		return
	}

	httpClient := http.Client{
		Transport: &authedTransport{
			wrapped: http.DefaultTransport,
		},…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mvltyldrmm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #95 on June 21, 2022 13:04.