lewisblackwood
05/24/2018, 12:34 PMprisma-bindings, and finding that if I add keys on my subfields, sometimes the result will be shown as null, even though nodes exist. Does anyone know why that would be? Here's an example:
query {
currentUser {
organisation {
usersWithInvite: users(
where: { invite: { id_not: null } }
) {
id
}
}
}
}
returns:
{
"data": {
"currentUser": {
"organisation": {
"usersWithInvite": null
}
}
}
}
If I add another users subselection, the whole query works as expected:
query {
currentUser {
organisation {
users {
id
}
usersWithInvite: users(
where: { invite: { id_not: null } }
) {
id
}
}
}
}
returns:
{
"data": {
"currentUser": {
"organisation": {
"users": [
...manyUsers
],
"usersWithInvite": [
...manyUsers
]
}
}
}
}lewisblackwood
05/24/2018, 12:35 PMprisma-bindings request just passes on the info value from the request:
ctx.db.query.user({ where: { id } }, info);lewisblackwood
05/24/2018, 12:38 PMusersWithInvite key...nilan
05/24/2018, 1:20 PMprisma-binding?tim2
05/24/2018, 1:35 PMlewisblackwood
05/24/2018, 1:41 PMcurrentUser resolver, which just gets the user ID from the JWT and passes it to the bindings query I showed above.
The odd thing is that when I review the logs for my Yoga server, I can see that the data is being returned:
Response from <http://localhost:4466>:
{
"user": {
"organisation": {
"usersWithInvite": [
{
"id": "cjhj6fv4403vu0820bavvaw97"
}
]
}
}
}tim2
05/24/2018, 1:44 PMOrganisation or Organisation.users defined but I guess not. Are you using the latest version of graphql-yoga? It's 1.14.2. We recently did changes regarding alias resolution that afaik should have fixed this issuelewisblackwood
05/24/2018, 2:36 PM1.14.2 and prisma-binding at 2.0.1. The issue still seems to be present.nilan
05/24/2018, 2:57 PMlewisblackwood
05/24/2018, 3:07 PM