When using gatsby-transformer-json
filtering an array doesn't work:
data.json
{
"foo": [
{
"name": "Name 1"
},
{
"name": "Name 2"
}
]
}
graphQL
{
dataJson(foo: {in: {name: {ne: "no match"}}}) {
foo {
name
}
}
}
error
{
"errors": [
{
"message": "Cannot read property 'id' of undefined",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"dataJson"
]
}
],
"data": {
"dataJson": null
}
}
It's the same if the data-array has an id-attribute in the object.
gatsby v1.9.45
Up!
Did you find a solution?
I'm having the same problem..
@MarbleCK nope. I didn't look into it anymore. Keep me posted if you find a solution.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues as many of them have already been resolved with the latest updates or explained in a previous issue.
Feel free to open a new one if you still experience this problem or a similar one! 馃憤
Also, marking this as a duplicate to #3643
Most helpful comment
Up!
Did you find a solution?
I'm having the same problem..