Skip to content

fix: apply directives when SDL contains type definitions and extensions with directives#4800

Merged
yaacovCR merged 2 commits into
graphql:17.x.xfrom
yaacovCR:fix-specifiedby-scalar-extensions
Jun 9, 2026
Merged

fix: apply directives when SDL contains type definitions and extensions with directives#4800
yaacovCR merged 2 commits into
graphql:17.x.xfrom
yaacovCR:fix-specifiedby-scalar-extensions

Conversation

@yaacovCR

@yaacovCR yaacovCR commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Previously, you could apply @specifiedBy programmatically on an initial schema, as a directive on a type definition within an initial schema, or as a directive on a type extension extending an existing schema, but you could not provide SDL for an initial schema where the SDL both included a scalar type definition and a type extension that added specifiedBy.

Re: other built-in SDL directives:

  • @deprecated cannot apply to types (yet?), so there is no no type-extension equivalent.
  • @deprecated can be added on extensions on fields, args, input fields, enum values but only as those schema elements are newly added to the enclosing schema element (e.g. as the field is added to the type), the schema element itself (e.g. field) cannot (yet?) be extended.
  • @oneOf per spec must not be provided by an input-object extension.

Recently added directive on directive does have this issue, so @deprecated potentially could have this bug with regard to directives, but it does not, this PR adds a test demonstrating no fix necessary there.

@yaacovCR yaacovCR added the PR: bug fix 🐞 requires increase of "patch" version number label Jun 9, 2026
@vercel

vercel Bot commented Jun 9, 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 merged commit 6e27711 into graphql:17.x.x Jun 9, 2026
22 of 23 checks passed
@yaacovCR yaacovCR deleted the fix-specifiedby-scalar-extensions branch June 9, 2026 08:06
yaacovCR added a commit that referenced this pull request Jun 15, 2026
## v17.0.0 (2026-06-15)

#### New Feature 🚀
* [#4819](#4819) feat: graduate directives on directives ([@yaacovCR](https://github.com/yaacovCR))

#### Bug Fix 🐞
* [#4799](#4799) fix: raise request error on invalid fragment variables ([@yaacovCR](https://github.com/yaacovCR))
* [#4800](#4800) fix: apply directives when SDL contains type definitions and extensions with directives ([@yaacovCR](https://github.com/yaacovCR))
* [#4564](#4564) OneOf Inhabitability ([@jbellenger](https://github.com/jbellenger))
* [#4814](#4814) fix(KnownDirectivesRule): locations for input field arguments in extensions ([@yaacovCR](https://github.com/yaacovCR))
* [#4726](#4726) feat(validation): reject directive definition cycles ([@yaacovCR](https://github.com/yaacovCR))
* [#4815](#4815) Revert "feat(validation): reject directive definition cycles (#4726)" ([@yaacovCR](https://github.com/yaacovCR))

#### Docs 📝
<details>
<summary> 11 PRs were merged </summary>

* [#4790](#4790) docs: minor diagnostics doc comment improvements ([@yaacovCR](https://github.com/yaacovCR))
* [#4791](#4791) fix: docs: polish diagnostics comments further ([@yaacovCR](https://github.com/yaacovCR))
* [#4793](#4793) docs: further improve general execution and tracing docs ([@yaacovCR](https://github.com/yaacovCR))
* [#4802](#4802) docs: correct extension field comments - v17 ([@yaacovCR](https://github.com/yaacovCR))
* [#4805](#4805) docs: publish fixed extensions comments ([@yaacovCR](https://github.com/yaacovCR))
* [#4807](#4807) docs: add prettier for jsdoc examples ([@yaacovCR](https://github.com/yaacovCR))
* [#4435](#4435) Subscriptions docs suggestions ([@Urigo](https://github.com/Urigo))
* [#4811](#4811) docs: fix a few indentations inside string literals ([@yaacovCR](https://github.com/yaacovCR))
* [#4813](#4813) internal: docs update ([@yaacovCR](https://github.com/yaacovCR))
* [#4820](#4820) docs: document `@experimental_disableErrorPropagation` ([@yaacovCR](https://github.com/yaacovCR))
* [#4817](#4817) docs: post 17.rc-0 update ([@yaacovCR](https://github.com/yaacovCR))
</details>

#### Polish 💅
<details>
<summary> 2 PRs were merged </summary>

* [#4809](#4809) internal: use prettier for non-generated website files ([@yaacovCR](https://github.com/yaacovCR))
* [#4812](#4812) polish: fix stream test cases ([@yaacovCR](https://github.com/yaacovCR))
</details>

#### Internal 🏠
<details>
<summary> 6 PRs were merged </summary>

* [#4795](#4795) chore: move website publishing from 16.x.x to 17.x.x ([@yaacovCR](https://github.com/yaacovCR))
* [#4796](#4796) internal: fix broken npm/deno deployments ([@yaacovCR](https://github.com/yaacovCR))
* [#4797](#4797) ci: update GitHub Actions versions ([@yaacovCR](https://github.com/yaacovCR))
* [#4806](#4806) internal: update frontmatter ([@yaacovCR](https://github.com/yaacovCR))
* [#4808](#4808) intenral: fix ci badge ([@yaacovCR](https://github.com/yaacovCR))
* [#4810](#4810) internal: add prettier:examples to lint-staged ([@yaacovCR](https://github.com/yaacovCR))
</details>

#### Committers: 3
* James Bellenger([@jbellenger](https://github.com/jbellenger))
* Uri Goldshtein([@Urigo](https://github.com/Urigo))
* Yaacov Rydzinski ([@yaacovCR](https://github.com/yaacovCR))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: bug fix 🐞 requires increase of "patch" version number

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant