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

Remote join failing when including aliased remote join keys in query #7180

@tasop-rsconnect

Description

@tasop-rsconnect

Using v2.0.1-cloud.1.
We have a remote schema to another hasura instance, hosted in Heroku, which is currently still in version v1.0.0-beta.4. I'm mentioning this because I'm not sure which one is causing the issue.

A table on the 2.0.1 instance has a remote relationship (say it's named details) to a table on the 1.0.0 instance, based on two fields (I'll call them name and type).
The remote relationship works as expected, unless both the below conditions are true:

  1. name and/or type is included in the query return values
  2. at least one of them is aliased (for example r_name: name).

If the two conditions above are true, the remote relationship returns null for all objects in the query, although the fields themselves return their values.

For example, the below

{
  my_table (limit: 1) {
    details {
      id
    }
    id
    type
  }
}

will return:

{
  "data": {
    "my_table": [
      {
        "details": [
          {
            "id": 123
          }
        ],
        "id": 456
        "type": "type1"
      }
    ]
  }
}

while the below:

{
  my_table (limit: 1) {
    details {
      id
    }
    id
    r_type: type
  }
}

will return:

{
  "data": {
    "my_table": [
      {
        "details": null,
        "id": 456,
        "r_type": "type1"
      }
    ]
  }
}

This issue seems very similar to #7125 but I'm adding it separately because, unlike in that description, the query works if the field is not aliased.

Metadata

Metadata

Assignees

Labels

c/serverRelated to serverk/bugSomething isn't workingp/highcandidate for being included in the upcoming sprint

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions