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

export data and auth providers #61

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

deniszatsepin
Copy link

Hi guys, thanks for this great extension for ReactAdmin.
I want to suggest a small improvement. Currently, it's not possible to extend providers (and we need to have some custom mutations). We have types of DataProvider and AuthProvider but there is no JavaScript exported for these classes.
Thank you!

@MrHertal
Copy link
Owner

Hi @deniszatsepin, thanks for the suggestion.

I have a question though: why not using buildAuthProvider and buildDataProvider in order to get the providers and then extend them following react-admin documentation?

@deniszatsepin
Copy link
Author

Hi @MrHertal, thanks for your response.

I've tried to use buildDataProvider and extend it as a first step, but it didn't work out in my case. I need to have a custom graphql call - approveResource. In buildDataProvider, only a subset of methods is exported and it does not allow access to the DataProvider class itself. So, I can't introduce a new method and call public graphql() of the DataProvider, because I don't have this linked to the DataProvider class instance.
Probably there is another way to achieve what I need.

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.

2 participants