-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Incomplete TypeScript typings in @graphiql/[email protected] #1989
Comments
Oof! My bad, I can patch that today. |
@ardatan what do you think we should do here? Just replace it with an |
That would be awesome! (Our CI is currently standing still.) |
Regarding the I don't know enough about this package to know whether that would suffice. If not, |
@acao I'm afraid the new version 0.3.1 of The new typings file // ...
import type { SubscriptionClient } from 'subscriptions-transport-ws'; // 1
//...
export declare type WebsocketsClient = Client | SubscriptionClient; // 2
export interface CreateFetcherOptions {
url: string;
subscriptionUrl?: string;
wsClient?: Client;
legacyClient?: SubscriptionClient; // 3
headers?: Record<string, string>;
wsConnectionParams?: ClientOptions['connectionParams'];
enableIncrementalDelivery?: boolean;
fetch?: typeof fetch;
schemaFetcher?: Fetcher;
} So the import of Could you make another attempt, ideally checking the generated types file to make sure the import is indeed gone? |
@DanielSWolf thanks for reporting that! i have a follow up PR that finalizes this, and also re-introduced a step to github actions that validates the imported build in a simple webpack project |
Thank you, @acao! It took us a few hours to verify the fix due to a problem with our local NPM proxy, but now everything is working fine again. |
In version 0.3.0,
@graphiql/toolkit
dropped the dependency onsubscriptions-transport-ws
, making it a devDependency only. The problem is that@graphiql/toolkit/dist/create-fetcher/types.d.ts
still performs a type import fromsubscriptions-transport-ws
. This means that any TypeScript project using@graphiql/toolkit
(orgraphiql
) but notsubscriptions-transport-ws
will now get a TypeScript error:The text was updated successfully, but these errors were encountered: