`gql check` and the TS plugin still fail on Windows when schema paths are absolute
I maintainer di solito rispondono entro 3 giorni
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript, vscode
Direzione di ricerca
Start with src/ts-plugin/index.ts, the schema loading helper in @gql.tada/internal 1.0.9, and graphqlsp 1.15.4; then review #4359 and #4367. Reproduce absolute-path loading on Windows, including a project and package on different drives, and verify how backslash relative paths are handled. Done means both gql check and the editor plugin load schemas from disk on Windows, with VS Code testing and no regressions on other platforms.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Follow-up to #4359 and the draft fix in #4367.
Status: neither case below has been reproduced on Windows yet. Both come from reading the code in @gql.tada/internal 1.0.9 and @0no-co/graphqlsp 1.15.4, plus Node URL behavior checks that are platform independent.
Background
gql.tada's getURLConfig runs new URL(origin) first. If that parses, the schema is loaded with loadFromURL (a network fetch). Only if it throws is the string treated as a file path and read via resolve(rootPath, origin).
On Windows, new URL("C:\\x\\y.json") parses (protocol c:), so an absolute drive-letter schema path is fetched instead of read from disk, which is the [Network] fetch failed in #4359. A file: URL is not a workaround: it parses as a URL too and goes to fetch.
#4367 fixes hydrogen gql check by passing the schema directory relative to the temporary tsconfig. Two cases remain.
1. Project and Hydrogen package on different drives
path.relative cannot produce a relative path across drives, so it returns the absolute path (for example path.win32.relative('D:\\proj\\.t', 'C:\\pkg\\dist') returns C:\pkg\dist). That parses as a URL, so hydrogen gql check still fails for this layout. A unit test in #4367 documents this as a known limitation.
Possible fix: copy the two schema files (about 1.4 MB and 1.7 MB) next to the temporary tsconfig and reference them by relative name, cleaned up with the existing temporary-file cleanup.
2. Editor TypeScript plugin
src/ts-plugin/index.ts passes an absolute SCHEMA_DIRECTORY = resolve(__dirname, "..") to the same helper, loaded through graphqlsp, which applies the same URL check. It very likely fails the same way on Windows, probably only logging Failed to load schema in the editor.
Things to be careful about:
- graphqlsp computes
rootPathasynchronously fromresolveTypeScriptRootDir(project.getProjectName()), so a relative path needs the right base directory. A wrong base would break every OS. - The change should apply only when the absolute path would parse as a URL, to leave POSIX behavior untouched.
- It needs testing in VS Code on Windows.
Needed
- Reproduction of both cases on Windows (including a cross-drive setup).
- Confirmation from #4359 on whether backslash relative paths are read from disk by gql.tada, which affects the approach for both.
- Lingua principale
- TypeScript
- Stelle
- 2.2k
- Fork
- 466
- Merge medio
- 3g 18h
- PR unite (30g)
- 59
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna 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 Shopify/hydrogen
-
ShopifyPrivacyBanner.showBanner()/showPreferences() types declare zero args, but headless stores require storefrontAccessToken (and domains) at runtimeForse già presa @minwookshin l’ha presa 53 giorni fa. Apertainactive
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Shopify/hydrogen#4069 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Remix 3: running Hydrogen 2026-10's core without a bindingForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
I maintainer di solito rispondono entro 3 giorni
-
`runWithCache` starts a background refresh for every stale hit, where 2025.7 started one per keyForse già presa @debojyoti10CC l’ha presa 6 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 3 giorni
-
`shopify:page:view` fires when `history.replaceState` changes only the query, as a variant selection doesForse già presa @Peerapatfc l’ha presa 6 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 53/100
I maintainer di solito rispondono entro 3 giorni
-
`hydrogen gql check` fails on Windows: absolute schema path is parsed as a URL by gql.tadaForse già presa @Roshan931 l’ha presa 12 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 30/100
Shopify/hydrogen#4359 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di Shopify/hydrogen
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
lidofinance/validator-ejector#233 ·
I maintainer di solito rispondono entro 1 giorno
-
desktop: app-version.v1 in drafts.sqlite is never refreshed — reports 1.19.4 while running 2.3.2Apertaarea/desktop platform/windows type/feature version/v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
anomalyco/opencode#66079 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
ai-driven-qa bug claude Major
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
linagora/twake-mail-admin#742 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OpenSlides/openslides-client#6728 ·
I maintainer di solito rispondono entro 1 giorno