@graphql-tools/executor-envelop 2.0.4 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.js CHANGED
@@ -102,7 +102,7 @@ function useExecutor(executor, opts) {
102
102
  },
103
103
  pluginCtx,
104
104
  ensureSchema,
105
- invalidateSupergraph() {
105
+ invalidateUnifiedGraph() {
106
106
  pluginCtx.schema$ = undefined;
107
107
  pluginCtx.schema = undefined;
108
108
  pluginCtx.skipIntrospection = false;
package/esm/index.js CHANGED
@@ -99,7 +99,7 @@ export function useExecutor(executor, opts) {
99
99
  },
100
100
  pluginCtx,
101
101
  ensureSchema,
102
- invalidateSupergraph() {
102
+ invalidateUnifiedGraph() {
103
103
  pluginCtx.schema$ = undefined;
104
104
  pluginCtx.schema = undefined;
105
105
  pluginCtx.skipIntrospection = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/executor-envelop",
3
- "version": "2.0.4",
3
+ "version": "3.0.0",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -11,9 +11,10 @@ export interface ExecutorPluginContext {
11
11
  export type ExecutorPluginOpts = Parameters<typeof schemaFromExecutor>[2] & {
12
12
  polling?: number;
13
13
  };
14
- export declare function useExecutor(executor: Executor, opts?: ExecutorPluginOpts): Plugin & {
15
- invalidateSupergraph: () => void;
14
+ export interface ExecutorPluginExtras {
15
+ invalidateUnifiedGraph: () => void;
16
16
  pluginCtx: ExecutorPluginContext;
17
17
  ensureSchema(ctx?: any): void;
18
- };
18
+ }
19
+ export declare function useExecutor<TPluginContext extends Record<string, any>>(executor: Executor, opts?: ExecutorPluginOpts): Plugin<TPluginContext> & ExecutorPluginExtras;
19
20
  export {};
@@ -11,9 +11,10 @@ export interface ExecutorPluginContext {
11
11
  export type ExecutorPluginOpts = Parameters<typeof schemaFromExecutor>[2] & {
12
12
  polling?: number;
13
13
  };
14
- export declare function useExecutor(executor: Executor, opts?: ExecutorPluginOpts): Plugin & {
15
- invalidateSupergraph: () => void;
14
+ export interface ExecutorPluginExtras {
15
+ invalidateUnifiedGraph: () => void;
16
16
  pluginCtx: ExecutorPluginContext;
17
17
  ensureSchema(ctx?: any): void;
18
- };
18
+ }
19
+ export declare function useExecutor<TPluginContext extends Record<string, any>>(executor: Executor, opts?: ExecutorPluginOpts): Plugin<TPluginContext> & ExecutorPluginExtras;
19
20
  export {};