Deprecate the introspectionEnabled option and remove it in 15.0.0
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 56/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
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 の本文から書いたものです。
説明
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 JVMIntrospection.INTROSPECTION_DISABLEDin theGraphQLContextof 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 theintrospectionEnabledproperty in a 14.x release, pointing to the two switches - in 15.0.0, remove both, the
BlockedFieldsblock inSchemaParser.parseSchemaObjectsand the tests inIntrospectionTestthat 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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
graphql-java-kickstart/graphql-java-tools のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
graphql-java-kickstart/graphql-java-tools#893 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
graphql-java-kickstart/graphql-java-tools#896 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
graphql-java-kickstart/graphql-java-tools#889 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
graphql-java-kickstart/graphql-java-tools#886 ·
メンテナーはふだん 1 日以内に返信
-
Reject directives applied at the wrong location, without a required argument or twice in 15.0.0オープンenhancement
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
graphql-java-kickstart/graphql-java-tools#884 ·
メンテナーはふだん 1 日以内に返信
graphql-java-kickstart/graphql-java-tools の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
leboncoin/spark-android#2342 ·
メンテナーはふだん 1 日以内に返信
-
The Voraton URL has been changed対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンBug Domain changed
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
keiyoushi/extensions-source#20257 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
user-grinch/RivoPhoneApp#302 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
LeanBitLab/LeanType#713 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信