panter / ra-data-prisma

Packages to connect react-admin with prisma version 2
MIT License
85 stars 28 forks source link

fix: #117 handling noncount nouns / no plural forms by configuring operation names #118

Closed mwillbanks closed 1 year ago

mwillbanks commented 2 years ago

Provide a way to override operation names to handle edge cases where the resource name is not the actual operation or the operations were customized

useDataProvider({
  operationNames: {
    RESOURCE_NAME: {
      create: "myCreateOperation",
      update: "myUpdateOperation",
      delete: "myDeleteOperation",
      one: "myOneOperation",
      many: "myManyOperation"
    }
  }
});
macrozone commented 1 year ago

hi @mwillbanks sorry for the late response, i wanted to merge this, but i saw that a similar change was already introduced, at least for mutations

i will rehaul all data provider options that are specific for resources soon here https://github.com/panter/ra-data-prisma/issues/128, so i will also check if your usecase is covered