Closed jbrumwell closed 1 year ago
Hi, I'll need more context where and how do you set/use the derived fields, but generally you cannot set or get those fields in the mappings as stated here in the documentation https://thegraph.com/docs/en/developing/creating-a-subgraph/#reverse-lookups. Currently there's a bug in graph-cli, that incorrectly creates getter and setter methods for those fields described in this issue https://github.com/graphprotocol/graph-cli/issues/943
@dimitrovmaksim thanks for the reply :) Yeah we don't set derived fields manually, but wasn't aware that we should avoid the accessors of these relationships.
I have multiple graphs that use these to update dependencies on child entities, In my case should I manage these dependencies on my own, or is there a recommended workaround?
Given the following schema
If there are no holders shouldn't it return an empty array? I have an older subgraph that works in this way and couldn't find any documentation on if this has changed?
With the above calling
results in an unexpected
null
error, alternatively if I make the field look this wayIt always returns
null
even if there are holders present