Unsupported fetch action type createMany
See original GitHub issueWhen I tried to use the import function, I am seeing:
Unsupported fetch action type createMany
could you please provide an example of how to implement createMany
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
The DataProvider action "createMany" isn't documented ...
Problem The createMany doesn't seem to be documented anywhere: It doesn't seem t... ... Unsupported fetch action type createMany ...
Read more >React-admin component does not use dataprovider to call api
I should get a JSON back with 1 element from the api, something like this: {count: 0} , so i just set this.setState({...
Read more >Prisma Client API (Reference)
createMany creates multiple records in a transaction. Options. Name, Type, Required, Description ...
Read more >Tickets - Zendesk Developer Docs
Tickets are the means through which your end users (customers) communicate with agents in Zendesk Support. Tickets can originate from a number of...
Read more >Instantiating Prefabs at run time - Unity - Manual
You can use code to create many copies of a Prefab in a particular ... on the projectile Prefab) performs the action of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Version
1.0.31
should fix the issue here. The new version should automatically handle those additional error cases.But if you’re still getting an error from
createMany
try disabling it by usingdisableCreateMany
in the options.Let me know if there’s any issues
Implementing CreateMany is always better than relying on the fallback. However, in some cases CreateMany is not supported at api(server) level. In those cases, implementing CreateMany is just repeating this code : https://github.com/benwinding/react-admin-import-csv/blob/9b7b840f76270fe7c444710881ed781a8d83c830/src/uploader.ts#L106-L123
Therefore, I think relying on the fallback is better if the api server does not support CreateMany. Fallback condition depends on the error raised,
Unknown dataProvider
: https://github.com/benwinding/react-admin-import-csv/blob/9b7b840f76270fe7c444710881ed781a8d83c830/src/uploader.ts#L147Error message for missing data provider function varies depending on data provider implementations. So in many cases, this fallback does not work without additional implmentations. In my case, I catch error from the data provider and throw “Unknown dataProvider”.
Making fallback work for various data provider implementions looks like difficult. Because there are no protocol to signal missing data provider functions in react admin. I think providing a tutorial for this would be the best.