groq-js icon indicating copy to clipboard operation
groq-js copied to clipboard

Allow reference resolution to be configured

Open chrisdmacrae opened this issue 4 years ago • 0 comments

I would like to specify what key that the _ref implementation searches on.

Right now, the following data structure:

[
  {
    _id: "1",
    text: "Foo",
    parent: {
      _ref: "2"
    }
  },
  {
    _id: "1",
    text: "Bar"
  },
]

When running it through a groq query like so: * { parent-> } it only resolve on _id. I want to be able to resolve on any key.

chrisdmacrae avatar Oct 25 '20 16:10 chrisdmacrae