-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Allow store.find
to accept query-params with id (Closes #1576).
#1579
Conversation
I'm thinking about how to handle |
This feels like quite an edge-case to me. I'd like to see a better use case than |
@bradleypriest This is related with #1576 please check the comments there, this has been adopted |
This could also help resolve #51 |
@wycats could you please have a look at this? Would make more sense to have this just in the JSONAPI adapter? |
@igorT ping |
I think the reload case is a bit tricky. In the json api spec, query params are used for requesting sideloading. In my mind a reload is tied to a specific record that you are reloading. If you are doing a reload and you pass in {include:comments} should the comments also go into a reloading state? |
@wycats thoughts? |
As @igorT points out, this doesn't work for all cases. I'd like to think about this more; at present, it feels too much like a scenario-solve than a comprehensive solution. |
we should likely enumerate the scenarios this must work for, this will likely guide the correct solution. |
Any updates on this? :) |
Hi @abuiles, was this merged? The third parameter seems to be ignored in the latest release. |
@kodayashi no, it wasn't merged. |
Gotcha, thanks for the update @abuiles. I believe @stefanpenner is looking for use cases here. Currently, I'm looking to use query parameters for a given 'model' object opposed to an entire collection of model objects: (theoretical) -- store.find('model', 1, {filter: 'filter_value'}) -- Only one model object needs to be loaded. Query param is then applied against object. (today) -- store.find('model', {id: 1, filter: 'filter_value'}) -- Entire model collection is loaded, then one model is filtered, then query param applied. For our use case, the param defines a filter for a Graph object that's associated with the 'model' object. Hope that helps. |
This is a first stab at supporting extra query params when requesting an specific id.