Improve GraphQL Variable Validation #4206
Labels
module/graphql
Issues related to Ballerina GraphQL module
Team/PCM
Protocol connector packages related issues
Type/Improvement
Description:
When a document contains more than one operation with variables, variable validation throws an error for not providing variable values for unused variables.
Consider the following schema:
Send the following document to the above service with
operationName: "SendMessage"
:With the following variables map:
This throws an error:
But this operation can be executed without the
$id
variable since it is not required for the operation.IMO, after parsing, we should only validate the given operation from the document, and we can omit the validation of other opertations.
The text was updated successfully, but these errors were encountered: