Exclude custom scalar literals from validation
At a glance​
- Identifier: #1157
- Stage: RFCX: Superseded
- Champion: @martinbonnin
- PR: Exclude custom scalar literals from validation
Timeline​
- Spec PR created on 2025-04-02 by martinbonnin
- Commit pushed: Exclude custom scalar literals from validation on 2025-04-02 by @martinbonnin
See https://github.com/graphql/graphql-spec/pull/1118/files#r2023188399
When validating a document, the custom scalar coercion rules are not always known. In those cases, it's impossible to validate them.
For an example, with this operation, it's impossible to detect that
"InvalidDate"is not a validDatewithout knowledge of the coercing rules:{
events(after: "InvalidDate") {
title
startsAt
}
}I think (but wouldn't bet on it) that this is already the case in graphql-js for an example?
Excluding those from the validation feels like a better reflection of the current state of things albeit probably a spec change.