configure hasura dataProvider
would anyone want to help me configure a 'Hasura' data provider? I've completed the 'Material UI' tutorial, and have a Hasura instance running. I've configured and imported an instance of the hasura dataProvider into the App, and created a list page for one of the resources associated with this hasura instance
11 Replies
Hey @UsererOfName 👋,
Can you check the permissions of your hasura api? Is there an error you get?
rising-crimson•2y ago
thanks for your response! i just inspected the network tab of the browser, and it looks like there was no request sent out to the hasura instance,
![No description](https://cdn.answeroverflow.com/1043262105979199538/image.png)
Hmm could you share list page?
rising-crimson•2y ago
`
i'll share the configured data provider and app also
configured provider,
It seems you forgot to send metaData to useDataGrid. You can get help from our hasura example
Also you can check our GraphQL docs
https://refine.dev/docs/advanced-tutorials/data-provider/graphql/
GraphQL | refine
refine graphql and strapi-graphql data provider built with gql-query-builder and graphql-request is made for GraphQL implemantation. It aims to create a query dynamically with gql-query-builder and send requests with graphql-request.
rising-crimson•2y ago
thanks, for the pointer
BTW If you don't have more than one dataprovider you should not use dataProviderName
https://refine.dev/docs/api-reference/core/providers/data-provider/#using-multiple-data-providers
Data Provider | refine
Overview
rising-crimson•2y ago
yes good point, forking off the tutorial, so eventually will remove the data provider from the tutorial
within the list page, I modified the configuration of the useDataGrid hook to include metadata related to what fields to include in the graphQL response... however, it appears that no request is being sent off... similar behavior as before
guess additional information to trouble shoot is that when the list is in a loading state (and times out) no request is sent and a snack bar pops up with,
rising-crimson•2y ago
i'll try reading an example implementation for reference, https://github.com/refinedev/refine/tree/master/examples/dataProvider/hasura
GitHub
refine/examples/dataProvider/hasura at master · refinedev/refine
Build your React-based CRUD applications, without constraints. - refine/examples/dataProvider/hasura at master · refinedev/refine
Can you share the StackBlitz link where we can reproduce the error?
rising-crimson•2y ago
thanks for your responsiveness. I can get one up maybe later tonight (U.S. tmime zone)
Currently taking the approach of forking off the Hasura example. Refine was able to send off the request to the designated Hasura instance, so i can continue exploring/troubleshooting... Might pop in later!