cost_validator raises GraphQLError when used to validate query without required variables being provided #504
Labels
docs
Focused on documentation contents
Milestone
Problem description
If the query with variables is used when cost_validator is enabled validation fails with the following error:
GraphQLError("Argument 'id' of required type 'Int!' was provided the variable '$id' which was not provided a runtime value.\n\nGraphQL request:1:34\n1 | query Hello($id: Int!){ hello(id:$id) }\n | ^")]
Version
Ariadne 0.13.0
How to reproduce:
I can make it work by disabling cost_validator or by explicitly setting variables to cost_validator constructor (like below) but this doesn't seem to make any sense for bigger schemas:
validation_errors = validate(schema, document, [cost_validator(maximum_cost=5, variables={'id': 10})])
The text was updated successfully, but these errors were encountered: