Intermittent error when querying a remote schema joined graphQL field.
See original GitHub issueGiven the following graphql query
query myQuery($param1:String!, $param2: String!) {
my_table {
id
name
externallyJoinedField(other_param_1: $param1, other_param_2: $param2) {
external_field_1
external_field_2
}
}
}
made with the following variables (for posterity, however the values do not matter)
{
"param1": "p1",
"param2": "p2"
}
where externallyJoinedField is a remotely joined field, the query (for me at least) fails intermittently (~50%?) with the following error:
{
"errors": [
{
"extensions": {
"path": "$.variableValues",
"code": "validation-failed"
},
"message": "unexpected variables: param2, param1"
}
]
}
Once it fails, it seems like reloading the metadata resolves the issue for…some amount of indeterminate time. Otherwise continuing to query with the same query will sometimes work again.
At first I was worried that remote joins didn’t support a field that had more arguments than the values provided by hasura to join on. However, even if that is true (which would be unfortunate) the main concern for me here is the intermittent nature of this behavior, which would imply to me that whatever it is, is not supposed to happen. Would love to know the expected behavior here, and what would cause this error.
Details
Version - v1.3.1
Metadata.yml:
version: 2
tables:
- table:
schema: public
name: my_table
remote_relationships:
- definition:
remote_field:
external_field:
arguments:
id: $id
hasura_fields:
- id
remote_schema: remote-schema
name: externallyJoinedField
remote_schemas:
- name: remote-schema
definition:
url: http://host.docker.internal:3099/graphql
timeout_seconds: 60
Remote Schema Graphql Schema
type ExternalType {
external_field_1: String!,
external_field_2: String!
}
type Query {
external_field(
id: String!
other_param_1: String!
other_param_2: String!
): [ExternalType!]
}
I know this is a weird issue, and it’s very possible I’ve done something weird on my end that’s causing this, but I tried to isolate the configuration down to be as simple as possible, and am still able to trigger this. If there’s more information I can provide to help debug or reproduce please let me know.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)

Top Related StackOverflow Question
@cozmo We are investigating this.
Hmm, @MinJunKimKR, that’d be surprising to me. As I understand it,
_eqis a param that hasura exposes in the resolvers for tables it manages. For the external schemas, hasura (I think) just directly exposes the underlying graphql schema, without any changes. At least this has been my experience with external schemas up until this point. As you can see in my remote graphql schema above, theexternal_fielddoesn’t expose_eq, but rather some params directly. As such, I’d expect you’d pass them directly when interacting with the remote joined field.This is backed up by the fact that the graphql schema, when querying hasura with an introspection query, as well as when interacting with the graphql editor in the hasura console both (correctly) have these params directly on the remote field, vs any
_eqparam.Additionally, the fact that this query only fails intermittently to me implies that the query itself isn’t incorrect, but rather there’s some sort of issue executing it. However maybe I misunderstand something?