hasura / hasura/graphql-engine

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

Open
#8,539 1 comment 1 reaction 0 assignees View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### 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](https://github.com/KazukiHayase/hasura-namespace-with-enum)
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](https://user-images.githubusercontent.com/74339461/171091683-a317cc26-3c31-4c26-b86d-5a88902aa2ea.png)

#### The error does not occur if passed directly arguments
![スクリーンショット 2022-05-31 13 15 10](https://user-images.githubusercontent.com/74339461/171091588-0c04bd2b-4bc3-428d-88ad-88e40386739e.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.