-
Notifications
You must be signed in to change notification settings - Fork 133
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
Coordinator 0.17.x
: Pull-through remote query's promise resolves empty set
#860
Comments
Notably, if I query the |
Similar-ish to #594 (comment) but I think that commenter had a failed query. |
The reason that your memory source query returns no records is that filtering records by deeply nested attribute values is not yet supported by record-caches. Attribute values are currently retrieved here. Luckily, it would be an easy change to support this: - let actual = deepGet(record, ['attributes', filter.attribute]);
+ let attributePath = filter.attribute.split('.');
+ let actual = deepGet(record, ['attributes', ...attributePath]); I'd like orbit to support this - let me know if you're interested in creating a PR. Interestingly, the JSONAPISource supports this out-of-the-box because it simply uses the whole attribute name in its |
Thank you... I may raise a PR for sure. I really, really appreciate your responses to the issues I've raised the last few days - I know it's a lot to maintain an OSS project so it is much appreciated 🙏 I think I asked (but it probably got lost) on a different ticket, but is there Thanks! |
Hey @bradjones1 - Sorry for the lack of visibility on the docs. I'm currently experimenting with a fresh docs site built with docusaurus and using typedoc to build API docs from src. I plan to push a branch soon that adds these docs to the main orbit repo to make it easier to contribute docs together with features (rather than keeping docs in a separate repo). Watch for a PR in the coming days, and please keep notes as you encounter WTFs. Your perspective as a new Orbit.js user is much appreciated! |
I am using
0.17.21
(.20
for some components not published at.21
) and attempting to pull from a jsonapi source, "through" a memory source configured with a coordinator. Querying thememory
source resolves an empty value from the query's returned promise. I am not primarily a JS developer so my debugging skills are novice, however my tracing around seems to indicate thedata
from the remote source is never copied over to thedata
returned from the promise. I think this is demonstrated at this breakpoint:However, pulling from the cache demonstrates the record was fetched and stored. (See last snippet.)
Coordinator configuration:
POC:
The text was updated successfully, but these errors were encountered: