Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: does global declaration need to be kept #172

Open
Moumouls opened this issue Aug 25, 2023 · 0 comments
Open

Question: does global declaration need to be kept #172

Moumouls opened this issue Aug 25, 2023 · 0 comments

Comments

@Moumouls
Copy link

Hello,

We have recently upgraded to the latest version (4.X) of the graphql-request package. Additionally, we are utilizing an older version of GraphQL Yoga v2.

During this process, we encountered a type conflict error. This was due to an older version of @whatwg-node/fetch that declared the same global as this package.

declare const _fetch: typeof fetch;
declare const _Request: typeof Request;
declare const _Response: typeof Response;
declare const _Headers: typeof Headers;
declare const _FormData: typeof FormData;
declare const _AbortController: typeof AbortController;
declare const _ReadableStream: typeof ReadableStream;
declare const _WritableStream: typeof WritableStream;
declare const _TransformStream: typeof TransformStream;
declare const _Blob: typeof Blob;
declare const _File: typeof File;
declare const _crypto: typeof crypto;
declare const _btoa: typeof btoa;
declare const _TextEncoder: typeof TextEncoder;
declare const _TextDecoder: typeof TextDecoder;
declare const _Event: typeof Event;
declare const _EventTarget: typeof EventTarget;

Fortunately, we noticed that in the newer version of @whatwg-node/fetch, they have removed the global declaration. This change helps avoid conflicts with this library. However, I'm wondering if it might be a good idea for this library to also remove the global declaration to prevent potential conflicts with other libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant