refine
refine copied to clipboard
[FEAT] Inferencers with Hasura dataProvider
Is your feature request related to a problem? Please describe.
When I initialize a new Hasura version of refine, and I use the command "refine create-ressource", the pages are generated with Inferencers (Mantine, ANT etc..) but they dont seem to work with GraphQL, I keep getting the following GraphQL error :
{"errors":[{"extensions":{"code":"validation-failed","path":"$.selectionSet.refine_posts_by_pk.selectionSet"},"message":"missing selection set for 'refine_posts'"}]}
Describe alternatives you've considered
No response
Additional context
No response
Describe the thing to improve
It would be awsome if the Inferencers would work out of the box with GraphQL
Hey @purplefish32 thank you for the issue! 🙏 We have this in our backlog and start implementing this as soon as possible. We have multiple approaches we might follow. Not very clear right now but I think the result will provide a smooth way for inferencer to interact with GraphQL APIs. 🚀
@aliemir do you plan to provide specific inferencing to Hasura or to any Graphql API in general?
Hey @beepsoft sorry for the late response 🙏 Yes, we're definitely planning to include GraphQL support to our Inferencer package. It's probably be like, you providing the gql query to the inferencer for the resources and the inferencer generating views for it. We've looked for the opportunity to use introspection but ended up not liking the result and the way it works 😅
We're hoping to get started on this feature as soon as possible and release the GraphQL support. I'll try to prioritize this as much as I can 🚀
@aliemir thank you so much for the explanation, eager to see and use the result. 😃
I'm also keen to use a generic dataProvider
for either GraphQL & Apollo Client. How's the progrss for this ticket so far? @aliemir
Hi team, hitting this roadblock when trying to use Hasura data provider. Hasura makes it easy to wire up a Postgres DB and is an excellent combination with Refine.
Hey @mayurdhurpate , Thank you for contacting us. The fact that Inferencer doesn't support GraphQL providers shouldn't be considered as a blocker. Inferencer is a Refine feature that shortens development time. You can already use Hasura with Refine. Please check out our Hasura examples and GraphQL documentation at https://refine.dev/docs/examples/data-provider/hasura/ and https://refine.dev/docs/advanced-tutorials/data-provider/graphql/.
Hey @purplefish32 @mayurdhurpate @beepsoft @Mingyang-Li , We have some news today that will make you happy 🎉 Inferencer can now be used with GraphQL data providers.
To try it out, update your refine dependencies (with npm run refine update) and check out our documentation at https://refine.dev/docs/packages/documentation/inferencer/ ! 🎯
Hasura example: https://github.com/refinedev/refine/tree/next/examples/inferencer-graphql-hasura