remote schema relationship is null even though relationship exists when i have multiple relationships to the same schema
Version Information
Server Version: v2.3.1 CLI Version (for CLI related issue): v2.3.1
Environment
OSS
What is the expected behaviour?
all remote relationships to the same schema should not be null because one is null, hasura should return data for the available relationships and null for the unavailable ones
Keywords
remote-schema
What is the current behaviour?
I have a hasura server in which tables have created_by and updated_by columns, where updated_by is nullable like below

i have a remote schema relationship setup like this

created_by is set on insert operations and updated_by on update operations

when i query the data like this
query {
users_roles {
name
creator {
id
name
}
updater {
id
name
}
}
}
for rows where updated_by is null both creator and updater remote schema relationships are null

How to reproduce the issue?
- created a table with
created_byandupdated_bycolumns related to a remote schema ascreatorandupdater - set
created_byonly for one of the rows - query your data
- for the row where
updated_byis not set, bothcreatorandupdaterwill be null
Screenshots or Screencast




Please provide any traces or logs that could help here.
Any possible solutions?
as a work around currently i am setting updated_by too on insert, but there are situations that solution is wrong
Can you identify the location in the source code where the problem exists?
No, i wish i could.
If the bug is confirmed, would you be willing to submit a PR?
I don't know Haskell 😟
This is biting me too.
Can confirm that if one of the column values is null, then both remote relationships return null.
I can confirm that I have also encountered the bug on my own project, but the workaround implemented by zolamk by setting a value anyway wouldn't work in my case since some of those fields are optional and cannot be set to a default value as easily as an "updated_by".
Another possible work around might be providing a default value from your remote schema that returns a default for your relationship when a specific field value is sent from hasura
Any updates on this issue ? I am also facing similar issues
Any update on this issue...? We too are facing similar issue, since we have updated Hasura from v2.0.9 to 2.8.1.
Facing the same issue here.. it would be great if we can fix this as soon as possible. 99% of our frontend (both web and mobile) are reliant on Hasura and we would love to use the new features of the latest releases but due to this bug we had to revert back to an older version. :(
Sorry for the delay! We have a PR with a fix, I'll let you know as soon as it is merged to main.