tirumaraiselvan / graphql-engine

Blazing fast, instant realtime GraphQL APIs on Postgres with fine grained access control
https://hasura.io
Apache License 2.0
2 stars 0 forks source link

From console, create a remote relationship with _and in where fails #54

Open nizar-m opened 5 years ago

nizar-m commented 5 years ago

The console generates the following query

{
  "type": "bulk",
  "args": [
    {
      "type": "create_remote_relationship",
      "args": {
        "name": "foo",
        .
        .
        "remote_field": {
          "hge_remote_addresses": {
            "arguments": {
              "where": {
                "_and": {
                  "id": {
                    "_eq": "$id"
                  },
                  "floor": {
                    "_eq": "$location_id"
                  }
                  .
                  .
}

The _and is generated as an object. It should be an array This gives the following error

{
  "path": "$.args[0].args",
  "error": "ExpectedTypeButGot (TypeNamed (Nullability {unNullability = True}) (NamedType {unNamedType = Name {unName = \"String\"}})) (TypeNamed (Nullability {unNullability = True}) (NamedType {unNamedType = Name {unName = \"Int\"}})) :| []",
  "code": "remote-schema-error"
}
patrykkopycinski commented 5 years ago

@nizar-m could you open this issue against the original repository https://github.com/hasura/graphql-engine?