Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed

Conversation

mwillbanks
Copy link
Contributor

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"
    }
  }
});

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
Copy link
Member

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 #128, so i will also check if your usecase is covered

@macrozone macrozone closed this May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants