-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat(data): Add HttpOptions to EntityActionOptions (#3663) #3664
Conversation
✅ Deploy Preview for ngrx-io ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
This is my first ever pull request so please let me know if I've stuffed anything up :) |
As this would be a breaking change, it would have to wait until the next major release. Also, does this PR #3717 achieve the same result? |
No, and I was able to work around #3717 using the clearCache method. This PR provides more general capability - by adding httpoptions to entity actions users can pass query params to any http requests flowing from entity actions - I raised this so I could pass params to a delete request. I considered doing it as a non-breaking change, but I think the api would be less coherent that way. If you think users would be taking advantage of the current |
Also if I'm not mistaken, this PR would solve #3717 by allowing the user to pass query params to the load action. |
If there is an option to do a non-breaking change in the short term that would be preferable. We can deprecate the current usage and do a breaking change in the next major if necessary. |
…trol over HttpClient requests (ngrx#3663) added doco - rewrite to be non-breaking
…trol over HttpClient requests (ngrx#3663) - Removed redundant property of HttpOptions - Added warnings re deprecation of queryParams in getWithQuery - make HttpOptions type serializable
…trol over HttpClient requests (ngrx#3663) - fixed warnig message and made it coniitional
Hey @brandonroberts, just FYI this now a non-breaking change. |
Thanks @cam-m! |
It is a breaking change. |
Do you want to create a Pull Request for this @e-oz ? |
Pull Request to change what exactly? I don't mind :) |
You're right @e-oz , I missed the case of user's adding http request options other than headers and params. I'm happy to submit a PR to address this. |
@cam-m that would be great thanks |
FYI I've not forgotten about this, have had trouble getting the unit tests to run on my win machine - switched to a mac and should have a PR in today. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Angular HttpParams and HttpHeaders cannot be passed from EntityCollectionDataService to underlying Data Service requests.
Closes #3663
What is the new behavior?
Http Params and HttpHeaders can be passed from EntityCollectionDataService to underlying Data Service requests.
Does this PR introduce a breaking change?
Method
getWithQuery(queryParams)
can be refactored in a future change to remove the queryParams arg if desired. It is made redundant by the new httpOptions arg.Other information