Skip to content

feat: introduce validateWithRules for complete document (sdl and/or executable) and/or existing schema validation#4835

Draft
yaacovCR wants to merge 1 commit into
graphql:17.x.xfrom
yaacovCR:validation-project
Draft

feat: introduce validateWithRules for complete document (sdl and/or executable) and/or existing schema validation#4835
yaacovCR wants to merge 1 commit into
graphql:17.x.xfrom
yaacovCR:validation-project

Conversation

@yaacovCR

@yaacovCR yaacovCR commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Previously, we could use validateSDL to validate type system AST against a limited set of SDL rules, validate when given a document against a schema to validate the document against the schema, or validateSchema to validate a built GraphQLSchema in a non rules-based manner.

This PR introduces validateWithRules that performs integrated rules-based validation on a document containing anything (executable definitions and/or SDL) and/or an existing built GraphQLSchema. The validation of a built schema is also divided up into rules.

By default, when validateWithRules is supplied both a document and a GraphQLSchema, existing schema-only errors are not reported; validation focuses on the document and any type-system definitions it contains. Set includeExistingSchemaErrors: true to also report errors from the existing schema, evaluated together with the document’s type-system definitions. When only a schema is passed, schema errors are always reported, and includeExistingSchemaErrors: false throws.

WIP.

@yaacovCR yaacovCR added the PR: feature 🚀 requires increase of "minor" version number label Jul 7, 2026
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

@yaacovCR is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@yaacovCR

yaacovCR commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author
image

HEAD~1 uses fallbacks to old workflows to "kind of" compare the new workflow to the old for rough ballpark estimates of feasability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: feature 🚀 requires increase of "minor" version number

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant