You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've created a dockerized stack with a react app and hasura graphql-engine in it. The two container works and I can access my Hasura console with a dummy admin secret: myadminsecretkey. This is only for setting the app fisrt time and try that I can connect to it.
I've created the ApolloClient based on the React tutorial:
const createApolloClient = (authToken) => {
return new ApolloClient({
link: new HttpLink({
uri: "http://hasura/v1/graphql",
headers: {
"x-hasura-admin-secret": authToken,
"content-type": "application/json",
},
}),
cache: new InMemoryCache(),
});
};
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I've created a dockerized stack with a react app and hasura graphql-engine in it. The two container works and I can access my Hasura console with a dummy admin secret: myadminsecretkey. This is only for setting the app fisrt time and try that I can connect to it.
I've created the ApolloClient based on the React tutorial:
const [client] = useState(createApolloClient("myadminsecretkey"));
When the app starts I can see on the network tab that the react app can connect to Hasura with status code 200, but my query get an error:
The query works on Hasura console. What can be wrong: the ApolloClient, Hasura settings...?
Beta Was this translation helpful? Give feedback.
All reactions