Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add experimental support for directives on directive definitions#4521

Merged
yaacovCR merged 26 commits into
graphql:16.x.xgraphql/graphql-js:16.x.xfrom
BoD:directive-on-directive-definitionsBoD/graphql-js:directive-on-directive-definitionsCopy head branch name to clipboard
Apr 24, 2026
Merged

Add experimental support for directives on directive definitions#4521
yaacovCR merged 26 commits into
graphql:16.x.xgraphql/graphql-js:16.x.xfrom
BoD:directive-on-directive-definitionsBoD/graphql-js:directive-on-directive-definitionsCopy head branch name to clipboard

Conversation

@BoD

@BoD BoD commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

Allow directives on directive definitions, based on this spec PR which introduces this syntax:

directive @onDirective on DIRECTIVE_DEFINITION

directive @foo @onDirective on OBJECT

directive @baz @deprecated(reason: "...") on OBJECT

extend directive @quux @deprecated(reason: "...")

Disclaimer

First time on this codebase and am also not a JS/TS person, so obvious mistakes and/or missing pieces are very likely 😅 Any help and feedback to improve this PR are very welcome 🙏. The tests seem to pass but additional tests may be needed.

@BoD
BoD requested a review from a team as a code owner January 6, 2026 17:46
@vercel

vercel Bot commented Jan 6, 2026

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

Comment thread src/language/parser.ts Outdated
Comment thread src/language/parser.ts Outdated
@leebyron

leebyron commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Update includeDeprecated arg per @benjie 's comments, then we'll merge

@BoD

BoD commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

Just made the change for includeDeprecated: Boolean! + added one test.

@jerelmiller jerelmiller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a few suggestions, mostly around types, but otherwise looks good from my end!

You probably want to get a proper review from someone who knows the conventions in this codebase better than I do, but wanted to try and help move this along in some way!

Comment thread src/language/parser.ts Outdated
Comment thread src/language/parser.ts Outdated
Comment thread src/utilities/__tests__/extendSchema-test.ts Outdated
Comment thread src/type/directives.ts
Comment thread src/utilities/extendSchema.ts Outdated
Comment thread src/utilities/extendSchema.ts Outdated
Comment thread src/utilities/extendSchema.ts Outdated
Comment thread src/utilities/extendSchema.ts Outdated
Comment thread src/utilities/extendSchema.ts Outdated
@benjie

benjie commented Apr 7, 2026

Copy link
Copy Markdown
Member

I've not fully reviewed this PR, but the changes since Lee's review all look fine to me - thanks @BoD! 👍

@yaacovCR
yaacovCR force-pushed the directive-on-directive-definitions branch 2 times, most recently from cd3b99e to 06a336c Compare April 24, 2026 09:46
@yaacovCR yaacovCR added spec RFC Implementation of a proposed change to the GraphQL specification PR: feature 🚀 requires increase of "minor" version number labels Apr 24, 2026
@yaacovCR
yaacovCR force-pushed the directive-on-directive-definitions branch from 06a336c to a9e07a6 Compare April 24, 2026 09:52
@yaacovCR

Copy link
Copy Markdown
Contributor

@BoD dropped in a few commits with fixes, possibly spec for some of them has to be correlated => have to check out ci failures a bit later….

@yaacovCR
yaacovCR force-pushed the directive-on-directive-definitions branch from a9e07a6 to e287ba1 Compare April 24, 2026 14:47
@yaacovCR
yaacovCR merged commit ad9c519 into graphql:16.x.x Apr 24, 2026
19 of 20 checks passed
@yaacovCR yaacovCR changed the title Add support for directives on directive definitions Add experimental support for directives on directive definitions May 6, 2026
yaacovCR added a commit that referenced this pull request May 6, 2026
## v16.14.0 (2026-05-03)

#### New Feature 🚀
* [#4317](#4317) Allow configuration of the `ofType` introspection depth ([@Nols1000](https://github.com/Nols1000))
* [#4521](#4521) Add experimental support for directives on directive definitions ([@BoD](https://github.com/BoD))

#### Bug Fix 🐞
* [#4652](#4652) Fix valueFromAST variable own-property checks
([@abishekgiri](https://github.com/abishekgiri))

#### Docs 📝
* [#4706](#4706) Fix mistake in GraphQLError guidance ([@benjie](https://github.com/benjie))

#### Committers: 4
* Abishek Kumar Giri([@abishekgiri](https://github.com/abishekgiri))
* Benjie([@benjie](https://github.com/benjie))
* Benoit 'BoD' Lubek([@BoD](https://github.com/BoD))
* Nils-Börge Margotti([@Nols1000](https://github.com/Nols1000))
yaacovCR added a commit that referenced this pull request May 8, 2026
Forward-ports #4521 to v17.

Co-authored-by: Benoit 'BoD' Lubek <BoD@JRAF.org>
yaacovCR added a commit that referenced this pull request May 10, 2026
## v17.0.0-beta.1 (2026-05-10)

#### Breaking Change 💥
* [#4729](#4729) subscribe: replace perEventExecutor with mapSourceToResponseEvent ([@yaacovCR](https://github.com/yaacovCR))
* [#4730](#4730) chore(engines): drop Node 20 support ([@yaacovCR](https://github.com/yaacovCR))
* [#4731](#4731) refactor(execution): extract buildResolveInfo helper ([@yaacovCR](https://github.com/yaacovCR))

#### New Feature 🚀
* [#4733](#4733) feat: support node v26 ([@yaacovCR](https://github.com/yaacovCR))

#### Bug Fix 🐞
* [#4725](#4725) chore: forward-port directives on directive definitions (#4521) ([@yaacovCR](https://github.com/yaacovCR))
* [#4727](#4727) chore: forward-port configuration of the `ofType` introspection depth (#4317) ([@yaacovCR](https://github.com/yaacovCR))

#### Polish 💅
* [#4728](#4728) polish: group FRAGMENT_VARIABLE_DEFINITION with executable defs ([@yaacovCR](https://github.com/yaacovCR))

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

* [#4460](#4460) internal: use node experimental-strip-types instead of ts-node ([@yaacovCR](https://github.com/yaacovCR))
* [#4732](#4732) internal: use node test instead of mocha + c8 ([@yaacovCR](https://github.com/yaacovCR))
* [#4734](#4734) internal: add comment re: rewriteRelativeImportExtensions ([@yaacovCR](https://github.com/yaacovCR))
</details>

#### Committers: 1
* 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: feature 🚀 requires increase of "minor" version number spec RFC Implementation of a proposed change to the GraphQL specification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.