refine
refine copied to clipboard
[FEAT]Define ID rule for hasura/graphql data provider
Is your feature request related to a problem? Please describe.
When using String as pk, the default hasura dataProvider always throws variable \"id\" is declared as uuid!, but used where String! is expected. Have to pass custom metaData everywhere to avoid the error.
Describe the solution you'd like Pass rules or default value when initializing the dataProvider.
Hey @ipy , Many thanks for reporting the issue. Let's see what we can do!
@omeraplak Can you assign this to me as i would like to work on it?
@ipy Can you share the code on which you have the error so that i can work on it?
@omeraplak Can you assign this to me as i would like to work on it?
I did it! Happy hacking 🎁
btw
The way to reproduce this error is to create an API over Hasura cloud and choose a type for the id field other than the uuid data type, for example, integer.
@pankod/refine-hasura data provider expects uuid by default for id column.(https://github.com/pankod/refine/blob/next/packages/hasura/src/dataProvider/index.ts#L133).
You can override id type in data hooks using metaData but it has to be repeated in each hook. Instead, dataProvider can take an option parameter.
Hi @omeraplak Can I look into it if @Smartmind12 you are looking into the other issue
Hi @omeraplak Can I look into it if @Smartmind12 you are looking into the other issue
Hey @Ruchika30 i was busy for a while these days but i am almost done working on this issue… so would kindly checkout other issues in the meanwhile… Thanksalot!
@Ruchika30 I am unable to solve this issue...if you are still interested then you can have a shot at it!! Goodluck!
Hi @omeraplak Can I look into it if @Smartmind12 you are looking into the other issue
Hey @Ruchika30 , If you are still interested I assigned the issue to you. Happy hacking!
I am facing issues while running the repo. I am following the guide . I did npm install npm run bootstrap, as I did not know which package to install. Then I did npm run start. But then I can see lots of issues getting listed in the terminal. Can u pls help me , what am I doing wrong ? @omeraplak
@omeraplak
Hey @Ruchika30 👋, Could you share terminal logs? ⚡️
@omeraplak
Could you check your node version? Your node version must be at least 16.14
Unassigned @Ruchika30 due to inactivity on this issue. Is there anyone wants to work on this issue? 🙏
@omeraplak can you give me an example of how to do that override using metadata ?
@omeraplak can you give me an example of how to do that override using
metadata?
Hey @sarathy-partha , You can find an example on our FAQ page 🚀 https://refine.dev/docs/faq/#how-i-can-override-specific-function-of-data-providers
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.