Skip to content

Commit a095e2c

Browse files
committed
Use node native URL, not polyfill
Polyfill removes the square brackets from ipv6 hostnames `[::1]` I would guess this is non standard and it breaks the UrlPattern polyfill. We use these addresses in the e2e test suite
1 parent e911b26 commit a095e2c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/core/graphql/graphql.options.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ export class GraphqlOptions implements GqlOptionsFactory {
6464
this.useAutomaticPersistedQueries(),
6565
// more,
6666
],
67+
fetchAPI: {
68+
// @whatwg-node/node-fetch polyfill doesn't keep square brackets for ipv6 hostname
69+
// Itself is patching a 10-year-old library to provide the polyfill.
70+
// IDK why it is even poly-filling, URL is available in Node since v10.
71+
URL,
72+
},
6773
};
6874
}
6975

0 commit comments

Comments
 (0)