graphql-parse-resolve-info: Import is causing issues with bundler
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- graphql, javascript, nextjs
- 領域
- build-system, frontend
調査の方向性
packages/graphql-parse-resolve-info/src/index.ts の20行目付近から始め、Next.js bundler で [email protected] を使用して問題を再現します。パッケージに既存のテストまたはビルド設定があるか確認します。バンドルされたパッケージで重複した GraphQL realm エラーが発生しなくなり、関連するチェックにパスすれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
Hello 👋 I'm using the graphql-parse-resolve-info package for a frontend project, which means it goes through a bundler (in my case that is Next.js). After upgrading my graphql version to 16.x I'm experiencing some weird errors that look like this:
Cannot use GraphQLScalarType "String" from another module or realm.
Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
https://yarnpkg.com/en/docs/selective-version-resolutions
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
Of course I checked that I don't have duplicate graphql versions. In fact I could track this issue down to a line in this package:
It looks like the issue is that getArgumentValues is not imported directly from graphql but rather from a sub-directory. I assume that is because it is only exposed since this commit: https://github.com/graphql/graphql-js/commit/6871bad65a7bdc0f9416f49944cd774f713cfb0b, which landed in version 16.4.0.
When I change this line to import directly from graphql, the error from above is gone. To be fair this is probably also caused by my bundler and using this package with a bundler is probably a niche use-case anyways.
Additional context
Relevant package versions:
- 主要言語
- JavaScript
- スター
- 764
- フォーク
- 128
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
graphile/graphile-engine のほかの issue
-
Provide a type guard to distinguish between ResolveTree and FieldsByTypeName再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
graphile/graphile-engine#849 · コメント 2 件 · リアクション 1 件 ·
-
🐛 bug help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
graphile/graphile-engine#818 ·
-
Race condition when closing LDS再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 32/100
graphile/graphile-engine#755 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
graphile/graphile-engine#725 · コメント 17 件 · リアクション 5 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
graphile/graphile-engine#723 ·
graphile/graphile-engine の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
directus/directus#28558 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
cloudflare/workers-sdk#17189 ·
メンテナーはふだん 1 日以内に返信
-
AWS Lambda Waiting for: Product Owner
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
getsentry/sentry-javascript#26910 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[🐛 Bug]: @wdio/reporter drops the function name of a string script in command output対応中かも @dhananjay6561 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
webdriverio/webdriverio#16507 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信