-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add a GET_COUNT fetch action for graphql dataProvider #5403
Add a GET_COUNT fetch action for graphql dataProvider #5403
Conversation
I have a bug, it doesn't work if you don't provide a custom |
8ddb882
to
b209df2
Compare
I have updated the unit tests but it shows that we potentially have a breaking change with this feature on the
I don't know if this is fine or not. If it's not, do you have some inputs about how to implement this without breaking change ? A quick fix could be to remove the check in |
e1c1c07
to
954a5f1
Compare
After more thought, there is no explicit error message in the There is no more breaking change. I have just added a more explicit error in |
954a5f1
to
a5c6a56
Compare
a5c6a56
to
3552801
Compare
I have also fixed a bug where the params where not filtered out if GET_COUNT query didn't declared them. The #2711 will be closable if this is merged :-) |
Just a little update, Is there something I should do to push this PR forward ? We would like to have this feature before deploying our backoffice based on react-admin to production :-) |
@fzaninotto @djhi Just a friendly ping :-) Do I have something to do for this PR to be merged ? |
Any chance to view this PR merged ? |
Hi, is it possible to merge this PR ? |
it needs rebase, can only be pushed to |
ok, thanks for the reply |
React-admin version 3 is feature freeze. Can you please rebase this PR against |
I'm closing this PR. I don't use this anymore and I'm not sure if it's useful to spare time on a rebase. Don't hesitate to comment if you think that it could be interesting to work on it, I could look at it if you want to. |
In the graphql provider, we have to define a query to fetch the total count of entity for a given resource. Previously, the name of this query was hardcoded.
This PR aims to allow the customization of this query name, such as every other query names.
I'm not sure about where to put the new
GET_COUNT
constant, tell me if you think there is a better place.I have exported
GET_COUNT
fromra-data-graphql-simple
to allow an easier use for developers, allowing to import this simbol directly fromra-data-graphql-simple
instead of having an explicit dependence onra-data-graphql
in the application code.Closes #4566