Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Deprecate the introspectionEnabled option and remove it in 15.0.0

オープン
#858 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
56/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
graphql, java, kotlin

調査の方向性

Start with SchemaParserOptions, SchemaParser.parseSchemaObjects, and the related tests in IntrospectionTest; inspect how #849 added BlockedFields and how the existing option is exposed. Deprecate the builder method and property in a 14.x release with guidance to the graphql-java switches, then remove them and the BlockedFields logic and tests in 15.0.0. Done when the option is removed in 15.0.0 and introspection behavior follows the migration guidance.

索引モデルが issue の本文から書いたものです。

説明

enhancement

SchemaParserOptions.introspectionEnabled(false) turns off introspection with a field visibility that hides every field of the introspection types (__Schema, __Type, ...). Until #849 that was graphql-java's NoIntrospectionGraphqlFieldVisibility, which graphql-java deprecated in v22 (graphql-java/graphql-java#3526):

NoIntrospectionGraphqlFieldVisibility is another way to do this but it does not allow dynamic on or off and it makes the schema invalid according to spec.

Their replacement checks __schema and __type when the query runs and returns an "introspection disabled" error. It has two switches:

  • Introspection.enabledJvmWide(false) for the whole JVM
  • Introspection.INTROSPECTION_DISABLED in the GraphQLContext of a single request

We can't use either one from the library. We don't execute requests, so we can't set the context key, and calling enabledJvmWide(false) from SchemaParser would also turn introspection off for every other schema in the app. So #849 swapped NoIntrospectionGraphqlFieldVisibility for the BlockedFields it wraps, which keeps the old behaviour, including its problems. Apps can use the graphql-java switches directly, so we should point them there and drop the option.

What to change
  • deprecate SchemaParserOptions.Builder.introspectionEnabled(...) and the introspectionEnabled property in a 14.x release, pointing to the two switches
  • in 15.0.0, remove both, the BlockedFields block in SchemaParser.parseSchemaObjects and the tests in IntrospectionTest that turn it off
Migration
// before
SchemaParserOptions.newOptions().introspectionEnabled(false)
// after, for the whole JVM
Introspection.enabledJvmWide(false)
// after, per request
ExecutionInput.newExecutionInput()
    .query(query)
    .graphQLContext(mapOf(Introspection.INTROSPECTION_DISABLED to true))

With the graphql-java switches, an introspection query fails with an "introspection disabled" error when it runs, instead of the FieldUndefined validation error it gets now.

主要言語
Kotlin
スター
824
フォーク
175
平均マージ
2日 5時間
マージ済み PR(30日)
53

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

graphql-java-kickstart/graphql-java-tools のほかの issue

graphql-java-kickstart/graphql-java-tools の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。