graphql / graphql/graphql-spec
Using variables in scalars
Open
- Dominant language
- JavaScript
- Stars
- 14.6k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
I would like some clarification on using variables in scalars.
Given the following schema:
```graphql
scalar Custom
type Query {
hello(custom: Custom!): String!
}
```
We know that the following query _could_ be valid (depending on `Custom`'s wire format):
```graphql
query Example {
hello(custom: { name: "Tim" })
}
```
Would the following example also be valid?
```graphql
query Example($name: String!) {
hello(custom: { name: $name })
}
```
If so, does the executor first resolve `$name` and then call the scalar's deserializer with `{ name: "Tim" }`?
Can someone shed some light on this?
Contributor guide
Assessment
This issue has not been assessed yet.