refine icon indicating copy to clipboard operation
refine copied to clipboard

[FEAT]Define ID rule for hasura/graphql data provider

Open ipy opened this issue 3 years ago • 15 comments

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.

ipy avatar Nov 27 '21 09:11 ipy

Hey @ipy , Many thanks for reporting the issue. Let's see what we can do!

omeraplak avatar Nov 29 '21 08:11 omeraplak

@omeraplak Can you assign this to me as i would like to work on it?

Smartmind12 avatar Oct 06 '22 14:10 Smartmind12

@ipy Can you share the code on which you have the error so that i can work on it?

Smartmind12 avatar Oct 06 '22 15:10 Smartmind12

@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.

omeraplak avatar Oct 06 '22 15:10 omeraplak

Hi @omeraplak Can I look into it if @Smartmind12 you are looking into the other issue

Ruchika30 avatar Oct 08 '22 15:10 Ruchika30

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!

Smartmind12 avatar Oct 08 '22 16:10 Smartmind12

@Ruchika30 I am unable to solve this issue...if you are still interested then you can have a shot at it!! Goodluck!

Smartmind12 avatar Oct 11 '22 03:10 Smartmind12

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!

omeraplak avatar Oct 13 '22 07:10 omeraplak

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

Ruchika30 avatar Oct 15 '22 12:10 Ruchika30

Hey @Ruchika30 👋, Could you share terminal logs? ⚡️

omeraplak avatar Oct 15 '22 12:10 omeraplak

Screenshot 2022-10-15 at 6 11 16 PM @omeraplak

Ruchika30 avatar Oct 15 '22 12:10 Ruchika30

Could you check your node version? Your node version must be at least 16.14

omeraplak avatar Oct 15 '22 13:10 omeraplak

Unassigned @Ruchika30 due to inactivity on this issue. Is there anyone wants to work on this issue? 🙏

aliemir avatar Oct 18 '22 07:10 aliemir

@omeraplak can you give me an example of how to do that override using metadata ?

sarathy-partha avatar Nov 11 '22 17:11 sarathy-partha

@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

omeraplak avatar Nov 11 '22 17:11 omeraplak

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.

stale[bot] avatar Feb 21 '23 08:02 stale[bot]