graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

Executing query fields defined by remote schema with input variables will not cause errors

Open KazukiHayase opened this issue 3 years ago • 1 comments

Version Information

Server Version: v2.7.0

Environment

OSS

What is the expected behaviour?

Executing query fields defined by remote schema with input variables will not cause errors.

What is the current behaviour?

Executing query fields defined by remote schema with input variables will cause errors.

{
  "data": null,
  "errors": [
    {
      "extensions": {
        "code": "GRAPHQL_VALIDATION_FAILED"
      },
      "message": "Unknown type \"spacex_order_by\". Did you mean \"users_order_by\", \"order_by\", \"users_max_order_by\", \"users_min_order_by\", or \"users_aggregate_order_by\"?",
      "locations": [
        {
          "line": 1,
          "column": 34
        }
      ]
    }
  ]
}

How to reproduce the issue?

  1. Add remote schema
  2. Add type names prefix
  3. Execute graphql query that have input arguments including type prefixed enum

or

  1. Clone and Setup this repository
  2. Execute graphql query as described in README.md

Screenshots or Screencast

The error occurs if passed via arguments

スクリーンショット 2022-05-31 13 16 01

The error does not occur if passed directly arguments

スクリーンショット 2022-05-31 13 15 10

KazukiHayase avatar May 31 '22 04:05 KazukiHayase

Experiencing the same issue with graphql-server v2.11.2

{
  "data": null,
  "errors": [
    {
      "extensions": {
        "code": "validation-failed",
        "path": "$.selectionSet.organization_config.args.order_by[0].org_id"
      },
      "message": "variable \"hasura_json_var_1\" is declared as signals_order_by, but used where order_by is expected"
    }
  ]
}

av avatar Sep 20 '22 09:09 av