这是indexloc提供的服务,不要输入任何密码
Skip to content

remote schema relationship is null even though relationship exists when i have multiple relationships to the same schema #8345

@zolamk

Description

@zolamk

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

image

i have a remote schema relationship setup like this

image

created_by is set on insert operations and updated_by on update operations

image

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

image

How to reproduce the issue?

  1. created a table with created_by and updated_by columns related to a remote schema as creator and updater
  2. set created_by only for one of the rows
  3. query your data
  4. for the row where updated_by is not set, both creator and updater will be null

Screenshots or Screencast

image

image

image

image

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 😟

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions