Skip to content

Are variables used in scalar considered used by an operation? #1115

Answered by martinbonnin
nightroman asked this question in Q&A
Discussion options

You must be logged in to vote

What you're looking at is input value coercion (edit: not really, see below):

If a variable is provided for an input object field, the runtime value of that variable must be used. 
If the runtime value is null and the field type is non-null, a field error must be raised. 
If no runtime value is provided, the variable definition’s default value should be used. 
If the variable definition does not provide a default value, the input object field definition’s default value should be used.

The following variables were not used: capacitance, tolerance, voltagerating_dc.

This sounds like a bug to me. The variables are indeed used. The fact that they are used inside a GraphQL literal shouldn't…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@yaacovCR
Comment options

@martinbonnin
Comment options

@andimarek
Comment options

@nightroman
Comment options

@andimarek
Comment options

Answer selected by nightroman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants