Closed LordA98 closed 3 years ago
It's a relation 1:M or M:M Item -> Options. It's clear you have options, so make a link called optionChoices that has field: "options" and is of type many, comming from Item to Options.
Thank you! Your comment made me realise my mistake.
I had created the links but was not referencing the link name in my query, I assumed the result would come through in the 'options' field.
Thanks for the quick response.
Hi,
This isn't an issue, but I'm struggling to figure out how to use Grapher to perform an aggregated find on an array of foreign keys.
For example, I can run this MongoDB query and get the result I expect:
This returns this result:
The 'optionChoices' field at the bottom corresponds to the 'options' field that is highlighted. The actual document just has the 'options' property which is an Array of Strings containing the IDs of documents in another collection.
Can I perform this same query in Grapher? If so, how do I do that? I'm struggling to understand how I would do it.
I've tried to keep this initial explanation short but I can find provide more context on the schemas, links and queries if required.