Skip to content

Commit

Permalink
refactor: remove WHATWG URL, URLSearchParams imports, use globals (#7228
Browse files Browse the repository at this point in the history
)

support for `Cloudflare Workers`

ref: #6034

Co-authored-by: David Glasser <glasser@davidglasser.net>
  • Loading branch information
dnalborczyk and glasser committed Dec 7, 2022
1 parent d057e2f commit f97e553
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/kind-drinks-carry.md
@@ -0,0 +1,6 @@
---
'@apollo/server-integration-testsuite': patch
'@apollo/server': patch
---

Improve compatibility with Cloudflare workers by avoiding the use of the Node `url` package. This change is intended to be a no-op.
1 change: 0 additions & 1 deletion packages/integration-testsuite/src/apolloServerTests.ts
@@ -1,6 +1,5 @@
import http from 'http';
import { createHash } from '@apollo/utils.createhash';
import { URL } from 'url';
import express from 'express';
import bodyParser from 'body-parser';
import loglevel from 'loglevel';
Expand Down
1 change: 0 additions & 1 deletion packages/server/src/runHttpQuery.ts
Expand Up @@ -18,7 +18,6 @@ import {
} from './ApolloServer.js';
import { FormattedExecutionResult, Kind } from 'graphql';
import { BadRequestError } from './internalErrorClasses.js';
import { URLSearchParams } from 'url';
import Negotiator from 'negotiator';
import { HeaderMap } from './utils/HeaderMap.js';

Expand Down

0 comments on commit f97e553

Please sign in to comment.