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

Allow configuration of the ofType introspection depth#4317

Merged
yaacovCR merged 5 commits into
graphql:16.x.xgraphql/graphql-js:16.x.xfrom
Nols1000:patch-2Nols1000/graphql-js:patch-2Copy head branch name to clipboard
Apr 25, 2026
Merged

Allow configuration of the ofType introspection depth#4317
yaacovCR merged 5 commits into
graphql:16.x.xgraphql/graphql-js:16.x.xfrom
Nols1000:patch-2Nols1000/graphql-js:patch-2Copy head branch name to clipboard

Conversation

@Nols1000

@Nols1000 Nols1000 commented Dec 31, 2024

Copy link
Copy Markdown
Contributor

This allows for a better configuration in case the server restricts the maximum query depth.


Added by @benjie:

@Nols1000
Nols1000 requested a review from a team as a code owner December 31, 2024 14:19
@linux-foundation-easycla

linux-foundation-easycla Bot commented Dec 31, 2024

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

Comment thread src/utilities/getIntrospectionQuery.ts
benjie
benjie previously requested changes Jan 3, 2025

@benjie benjie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's keep this nicely formatted :)

Comment thread src/utilities/getIntrospectionQuery.ts Outdated
Comment thread src/utilities/getIntrospectionQuery.ts Outdated
Comment thread src/utilities/getIntrospectionQuery.ts Outdated
@benjie benjie changed the title Update getIntrospectionQuery.ts to allow configuration of the type query depth Update getIntrospectionQuery.ts to allow configuration of the type introspection depth Jan 3, 2025
@benjie benjie changed the title Update getIntrospectionQuery.ts to allow configuration of the type introspection depth Allow configuration of the ofType introspection depth Jan 3, 2025
@Nols1000

Nols1000 commented Jan 3, 2025

Copy link
Copy Markdown
Contributor Author

@benjie Thanks for the suggestions. I've commited them my branch. I think for the scope of this PR that is the right move.

I'd also like to take this as an opportunity to discuss formatting the introspection query. I think it would be simpler to just keep the query in one line, without indentions. This could clean up the code and save a few byte over the wire. It would of course reduce the readability. Maybe we can document the query better, so that would become less of an issue.

@benjie

benjie commented Jan 5, 2025

Copy link
Copy Markdown
Member

You can always minify it by parsing it and using a GraphQL minifier. I don't think our source code should concern itself with that too much - we should make it easy to read and edit. What sort of comments do you have in mind?

@ThePlenkov

Copy link
Copy Markdown

@Nols1000 can you run please npm run lint -- --fix in your branch to get rid of a lint error?

@ThePlenkov

Copy link
Copy Markdown

@Nols1000 also please cover this line with a test case:
image

You can see it here https://app.codecov.io/gh/graphql/graphql-js/pull/4317

Thanks!

I decided not to submit identical MR, so now also interested in introducing this change

Comment thread src/utilities/getIntrospectionQuery.ts Outdated
Comment thread src/utilities/getIntrospectionQuery.ts Outdated
Comment thread src/utilities/getIntrospectionQuery.ts Outdated
Comment thread src/utilities/getIntrospectionQuery.ts Outdated

@JoviDeCroock JoviDeCroock 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.

This looks like a good feature to have, great work, left some comments but pending those changes this should be good to go

@Nols1000

Copy link
Copy Markdown
Contributor Author

@benjie At least for me it's not 100% clear how the query works. I would have expected more documentation e.g. here https://graphql.org/learn/introspection/. For me a breakdown of this introspection query would have been a great learning resource.

@JoviDeCroock JoviDeCroock added the PR: feature 🚀 requires increase of "minor" version number label Jan 16, 2025

@benjie benjie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me 👍

Nols1000 and others added 4 commits April 24, 2026 18:47
…ery depth

This allows for a better configuration in case the server restricts the maximum query depth.
Co-authored-by: Benjie <benjie@jemjie.com>
Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
@vercel

vercel Bot commented Apr 24, 2026

Copy link
Copy Markdown

@Nols1000 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 8eb6383 into graphql:16.x.x Apr 25, 2026
19 of 20 checks passed
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
…#4317) (#4727)

Co-authored-by: Nils-Börge Margotti <nilsmargotti@gmail.com>
Co-authored-by: Benjie <benjie@jemjie.com>
Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce introspection complexity programmatically

6 participants

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