Skip to content

Commit 8fcfe3f

Browse files
committed
Fix type compatibility between MeshPlugin and GatewayPlugin"
1 parent 6360755 commit 8fcfe3f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.changeset/honest-mayflies-relax.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-mesh/types': patch
3+
---
4+
5+
Fix compatibility between MeshPlugin and GatewayPlugin

packages/legacy/types/src/index.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,11 @@ export type OnDelegateHookDonePayload = {
154154

155155
export type OnDelegateHookDone = (payload: OnDelegateHookDonePayload) => PromiseOrValue<void>;
156156

157-
interface AsyncDisposable {
158-
[Symbol.asyncDispose](): PromiseLike<void>;
159-
}
160-
161157
export type MeshPlugin<TContext> = Plugin<TContext> & {
162158
onFetch?: OnFetchHook<TContext>;
163159
onDelegate?: OnDelegateHook<TContext>;
164-
} & Partial<AsyncDisposable>;
160+
[Symbol.asyncDispose]?: () => PromiseLike<void> | void;
161+
};
165162

166163
export type MeshFetch = (
167164
url: string,

0 commit comments

Comments
 (0)