RFC X / Superseded

Exclude custom scalar literals from validation

Opened on2025-04-02
Closed on2025-04-03

At a glance

Spec PR description

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 valid Date without 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.

Timeline

  • Spec PR created on 2025-04-02 by martinbonnin
  • Commit pushed on 2025-04-02 by martinbonnin: Exclude custom scalar literals from validation