Skip to content

Commit

Permalink
Fix type compatibility between MeshPlugin and GatewayPlugin"
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Nov 25, 2024
1 parent 6360755 commit 8fcfe3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-mayflies-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-mesh/types': patch
---

Fix compatibility between MeshPlugin and GatewayPlugin
7 changes: 2 additions & 5 deletions packages/legacy/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,11 @@ export type OnDelegateHookDonePayload = {

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

interface AsyncDisposable {
[Symbol.asyncDispose](): PromiseLike<void>;
}

export type MeshPlugin<TContext> = Plugin<TContext> & {
onFetch?: OnFetchHook<TContext>;
onDelegate?: OnDelegateHook<TContext>;
} & Partial<AsyncDisposable>;
[Symbol.asyncDispose]?: () => PromiseLike<void> | void;
};

export type MeshFetch = (
url: string,
Expand Down

0 comments on commit 8fcfe3f

Please sign in to comment.