Hey,
we are using GraphQL in our (React) Web App to get data from MongoDB. The whole thing is set up using Realm.
Unfortunately we get errors quering the results. And strangely this happens only occasionally (~1 out of 5 times) but will sometimes prevent our users to use our service
Our Query looks like this:
query {
merchants {
name
address {
postalCode
street
}
}
}
And as a result we get this (sometimes):
{
"data": {
"merchants": [
{
"address": null,
"name": "Test Merchant 1"
},
{
"address": null,
"name": "Test Merchant 2"
},
{
"address": null,
"name": "Test Merchant 3"
}
]
},
"errors": [
{
"message": "runtime error: slice bounds out of range [-1:]",
"locations": [
{
"line": 5,
"column": 7
}
],
"path": ["merchants", 0, "address", "postalCode"]
},
{
"message": "runtime error: slice bounds out of range [-1:]",
"locations": [
{
"line": 5,
"column": 7
}
],
"path": ["merchants", 1, "address", "postalCode"]
},
{
"message": "runtime error: slice bounds out of range [-1:]",
"locations": [
{
"line": 5,
"column": 7
}
],
"path": ["merchants", 2, "address", "postalCode"]
}
]
}
We get this error even using the Realm GraphQL playground.
Any ideas why this is happening sometimes or how to avoid it?
Kind Regards