Open vuongxuongminh opened 2 years ago
This issue still happen on version 2.5.0
There's a tangential issue, when GraphQL customization is in place for a Remote Schema.
Hasura doesn't seem to rename the query variables types to their original value before sending request to the remote server:
query organization_config($orderBy: [signals_organization_config_order_by!]) {
items: signals_organization_config(
order_by: $orderBy,
limit: 10
) {
created_at
org_id
}
}
Error is:
{
"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"
}
]
Where signals_organization_config
is a prefixed organization_config
field from a signals
Remote Schema.
@av issue solved since 2.11
Version Information
Server Version: v2.2.0
Environment
OSS
What is the expected behaviour?
Query remote schema (Hasura) fields with input variables did not cause errors
What is the current behaviour?
Query remote schema (Hasura) fields with input variables will cause errors:
There can be only one variable named \"$hasura_json_var_1\".
How to reproduce the issue?
Access Hasura 1 via url: http://localhost:8080 and add Contentful remote schema:
https://graphql.contentful.com/content/v1/spaces/f8bqpb154z8p/environments/master?access_token=9d5de88248563ebc0d2ad688d0473f56fcd31c600e419d6c8962f6aed0150599
Access Hasura 2 via url: http://localhost:8081 and add Hasura 1 remote schema:
http://hasura1:8080/v1/graphql
Modify remote schema Hasura 1 with type and fields prefix with
hasura1_
Execute query bellow in Hasura 2 console:
With variables: