Are variables used in scalar considered used by an operation? #1115
-
This post is a question in the first place. But it's also a suggestion, maybe In the below query, variables query MultiMatch($product: String!, $capacitance: Float!, $tolerance: Int!, $voltagerating_dc: Int!) {
search(
country: "NL"
currency: "EUR"
distributorapi_timeout: "3s"
q: $product
filters: {capacitance: $capacitance, tolerance: $tolerance, voltagerating_dc_: $voltagerating_dc}
start: 0
limit: 5
) {
hits
results {
part {
id
name
mpn
specs {
attribute {
name
}
value
}
}
}
}
} Is the above GraphQL valid according to the specs? One known GraphQL server works fine with such a query. Another known server fails with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
What you're looking at is input value coercion (edit: not really, see below):
This sounds like a bug to me. The variables are indeed used. The fact that they are used inside a GraphQL literal shouldn't matter IMO. |
Beta Was this translation helpful? Give feedback.
What you're looking at is input value coercion (edit: not really, see below):
This sounds like a bug to me. The variables are indeed used. The fact that they are used inside a GraphQL literal shouldn't…