question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Documentation: The DataProvider action "createMany" isn't documented anywhere

See original GitHub issue

Context I’m trying to fix an issue in this library https://github.com/benwinding/react-admin-import-csv/issues/21 and was encouraged to use the createMany method on the DataProvider.

Problem The createMany doesn’t seem to be documented anywhere:

image

image

Is this a new action? Or is it optional?

Environment

  • React-admin version: 3.8.4
  • Last version that did not exhibit the issue (if applicable): -
  • React version: 16.8.6
  • Browser: Chrome
  • Stack trace (in case of a JS error): -

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
fzaninottocommented, Sep 16, 2020

Yep: call createMany in a try/catch, and fallback to create in the catch block.

0reactions
benwindingcommented, Sep 15, 2020

We’re adding TypeScript types to encourage doing that type of check at compile time, but that implies that you use these type sin your code, too.

Yes, my library react-admin-import-csv is written in Typescript so I’m using types where I can.

I want to call a custom DataProvider verb createMany if it exists otherwise fallback to the singular create method. Is there a clean way to do this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create a new Document with Data Provider through ...
I am trying to recreate a very similar document through RESTful API and can't seem to figure out how to add Expressions to...
Read more >
Data Provider - Refine Dev
createMany ​. This method allows us to create multiple items in a resource. dataProvider.ts. const SimpleRestDataProvider ...
Read more >
Oracle Database Example | Test Studio Dev Documentation
1. Click on Add from Data Sources menu: · 2. In the Create new data source dialog - for Data Source Types choose...
Read more >
Building Web and Mobile Applications with Visual Builder Studio
When a component isn't selected, the options in the menu will vary. ... You can drag an action over any other action node...
Read more >
IBM Tivoli Monitoring: Administrator's Guide
IBM Tivoli Monitoring dashboard data provider for retrieving monitoring data ... documented in IBM Tivoli Monitoring Troubleshooting Guide, when you recycle ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found