Open cboileau opened 6 years ago
Thanks for the bug report! The problem might occur because you are nesting links. I'm thinking of a particular TODO comment... I hope I'll find time to look into this soon.
Thanks! I was trying to figure out how everything worked in the library so I could make a fix and PR it back, but I think some of it is beyond my understanding. At what point does the single query get split up into multiple requests to the endpoints?
Sitting with the same problem, any ETA on a fix?
I looked into this a bit more and found out that properly supporting nested links is more tricky than I thought.
It should work by calling weaveSchemas
twice, first applying the inner link, then the outer link. Would that work for you?
Can you provide a working example?
Sorry for the delay, I just added a test case demonstrating this workaround.
Summary
For some reason some virtual fields are returning null for me, while others are working. When I specify the linkFieldName, the endpoint for
lc
doesn't even get hit to resolve the query. However, if I don't use a linkFieldName, it does hit thelc
endpoint, and returns the correct data.This library is amazing, and I love it, so I'm hoping there is a way to get this to work.
I also have another unrelated question: Is it possible to create more than one link for a field, to support polymorphic relations?
Example of the problem
Schema
Query
Response
Notice how all of the activity fields are null
Working (without linkFieldName)
Schema
Query
Response