graphql-parse-resolve-info: Import is causing issues with bundler
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- graphql, javascript, nextjs
- Ambito
- build-system, frontend
Direzione di ricerca
Inizia da packages/graphql-parse-resolve-info/src/index.ts intorno alla riga 20 e riproduci il problema usando [email protected] con un bundler Next.js. Controlla i test esistenti del package o la configurazione di build; il lavoro è completato quando il package bundleizzato non attiva più l'errore di realm GraphQL duplicato e i controlli pertinenti hanno esito positivo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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:
- Lingua principale
- JavaScript
- Stelle
- 764
- Fork
- 128
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di graphile/graphile-engine
-
Provide a type guard to distinguish between ResolveTree and FieldsByTypeNameForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
graphile/graphile-engine#849 · 2 commenti · 1 reazione ·
-
🐛 bug help wanted
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
graphile/graphile-engine#818 ·
-
Race condition when closing LDSForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 32/100
graphile/graphile-engine#755 · 2 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
graphile/graphile-engine#725 · 17 commenti · 5 reazioni ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
graphile/graphile-engine#723 ·
Tutte le issue di graphile/graphile-engine
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
directus/directus#28558 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
cloudflare/workers-sdk#17189 ·
I maintainer di solito rispondono entro 1 giorno
-
AWS Lambda Waiting for: Product Owner
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
getsentry/sentry-javascript#26910 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[🐛 Bug]: @wdio/reporter drops the function name of a string script in command outputForse già presa @dhananjay6561 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
webdriverio/webdriverio#16507 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno