@graphql-mesh/types 0.104.16-alpha-20251107223441-9b7d04a1d327702de52ef57849b0738f6dbdb06f → 0.104.16-alpha-20251107231152-c65a6c21c2316ebd82a5d4ae684f35578c47502e
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/store.js +0 -0
- package/esm/store.js +0 -0
- package/package.json +2 -3
- package/typings/index.d.cts +3 -3
- package/typings/index.d.ts +3 -3
- package/typings/store.d.cts +21 -0
- package/typings/store.d.ts +21 -0
package/cjs/store.js
ADDED
|
File without changes
|
package/esm/store.js
ADDED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/types",
|
|
3
|
-
"version": "0.104.16-alpha-
|
|
3
|
+
"version": "0.104.16-alpha-20251107231152-c65a6c21c2316ebd82a5d4ae684f35578c47502e",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@graphql-hive/pubsub": "
|
|
10
|
-
"@graphql-mesh/store": "0.104.16-alpha-20251107223441-9b7d04a1d327702de52ef57849b0738f6dbdb06f",
|
|
9
|
+
"@graphql-hive/pubsub": "^2.1.1",
|
|
11
10
|
"@graphql-tools/batch-delegate": "^10.0.0",
|
|
12
11
|
"@graphql-tools/delegate": "^11.0.0",
|
|
13
12
|
"@graphql-tools/utils": "^10.8.0",
|
package/typings/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { DocumentNode, GraphQLResolveInfo, GraphQLSchema, SelectionSetNode } from 'graphql';
|
|
2
2
|
import type { PromiseOrValue } from 'graphql/jsutils/PromiseOrValue.cjs';
|
|
3
3
|
import type { Plugin } from '@envelop/core';
|
|
4
|
-
import type { MeshStore } from '@graphql-mesh/store';
|
|
5
4
|
import type { BatchDelegateOptions } from '@graphql-tools/batch-delegate';
|
|
6
5
|
import type { CreateProxyingResolverFn, IDelegateToSchemaOptions, MergedTypeConfig, SubschemaConfig, Transform } from '@graphql-tools/delegate';
|
|
7
6
|
import type { ExecutionRequest, Executor, IResolvers, MaybePromise } from '@graphql-tools/utils';
|
|
8
7
|
import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
9
8
|
import * as YamlConfig from './config.cjs';
|
|
10
9
|
import type { MeshPubSub } from './pubsub.cjs';
|
|
10
|
+
import type { IMeshStore } from './store.cjs';
|
|
11
11
|
export * from './pubsub.cjs';
|
|
12
12
|
export { jsonSchema } from './config-schema.cjs';
|
|
13
13
|
export { YamlConfig };
|
|
@@ -37,7 +37,7 @@ export type MeshHandlerOptions<THandlerConfig> = {
|
|
|
37
37
|
baseDir: string;
|
|
38
38
|
cache: KeyValueCache;
|
|
39
39
|
pubsub: MeshPubSub;
|
|
40
|
-
store:
|
|
40
|
+
store: IMeshStore;
|
|
41
41
|
logger: Logger;
|
|
42
42
|
importFn: ImportFn;
|
|
43
43
|
};
|
|
@@ -70,7 +70,7 @@ export interface MeshMergerOptions {
|
|
|
70
70
|
cache: KeyValueCache;
|
|
71
71
|
pubsub: MeshPubSub;
|
|
72
72
|
logger: Logger;
|
|
73
|
-
store:
|
|
73
|
+
store: IMeshStore;
|
|
74
74
|
}
|
|
75
75
|
export interface MeshMergerLibrary {
|
|
76
76
|
new (options: MeshMergerOptions): MeshMerger;
|
package/typings/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { DocumentNode, GraphQLResolveInfo, GraphQLSchema, SelectionSetNode } from 'graphql';
|
|
2
2
|
import type { PromiseOrValue } from 'graphql/jsutils/PromiseOrValue.js';
|
|
3
3
|
import type { Plugin } from '@envelop/core';
|
|
4
|
-
import type { MeshStore } from '@graphql-mesh/store';
|
|
5
4
|
import type { BatchDelegateOptions } from '@graphql-tools/batch-delegate';
|
|
6
5
|
import type { CreateProxyingResolverFn, IDelegateToSchemaOptions, MergedTypeConfig, SubschemaConfig, Transform } from '@graphql-tools/delegate';
|
|
7
6
|
import type { ExecutionRequest, Executor, IResolvers, MaybePromise } from '@graphql-tools/utils';
|
|
8
7
|
import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
9
8
|
import * as YamlConfig from './config.js';
|
|
10
9
|
import type { MeshPubSub } from './pubsub.js';
|
|
10
|
+
import type { IMeshStore } from './store.js';
|
|
11
11
|
export * from './pubsub.js';
|
|
12
12
|
export { jsonSchema } from './config-schema.js';
|
|
13
13
|
export { YamlConfig };
|
|
@@ -37,7 +37,7 @@ export type MeshHandlerOptions<THandlerConfig> = {
|
|
|
37
37
|
baseDir: string;
|
|
38
38
|
cache: KeyValueCache;
|
|
39
39
|
pubsub: MeshPubSub;
|
|
40
|
-
store:
|
|
40
|
+
store: IMeshStore;
|
|
41
41
|
logger: Logger;
|
|
42
42
|
importFn: ImportFn;
|
|
43
43
|
};
|
|
@@ -70,7 +70,7 @@ export interface MeshMergerOptions {
|
|
|
70
70
|
cache: KeyValueCache;
|
|
71
71
|
pubsub: MeshPubSub;
|
|
72
72
|
logger: Logger;
|
|
73
|
-
store:
|
|
73
|
+
store: IMeshStore;
|
|
74
74
|
}
|
|
75
75
|
export interface MeshMergerLibrary {
|
|
76
76
|
new (options: MeshMergerOptions): MeshMerger;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type StoreFlags = {
|
|
2
|
+
readonly: boolean;
|
|
3
|
+
validate: boolean;
|
|
4
|
+
};
|
|
5
|
+
type ProxyOptions<TData, TJSONData = any> = {
|
|
6
|
+
codify: (value: TData, identifier: string) => string | Promise<string>;
|
|
7
|
+
fromJSON: (jsonData: TJSONData, identifier: string) => TData | Promise<TData>;
|
|
8
|
+
toJSON: (value: TData, identifier: string) => TJSONData | Promise<TJSONData>;
|
|
9
|
+
validate: (oldValue: TData, newValue: TData, identifier: string) => void | Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
type StoreProxy<TData> = {
|
|
12
|
+
set(value: TData): Promise<void>;
|
|
13
|
+
get(): Promise<TData>;
|
|
14
|
+
getWithSet(setterFn: () => TData | Promise<TData>): Promise<TData>;
|
|
15
|
+
delete(): Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
export interface IMeshStore {
|
|
18
|
+
child(childIdentifier: string, flags?: Partial<StoreFlags>): IMeshStore;
|
|
19
|
+
proxy<TData>(id: string, options: ProxyOptions<TData>): StoreProxy<TData>;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type StoreFlags = {
|
|
2
|
+
readonly: boolean;
|
|
3
|
+
validate: boolean;
|
|
4
|
+
};
|
|
5
|
+
type ProxyOptions<TData, TJSONData = any> = {
|
|
6
|
+
codify: (value: TData, identifier: string) => string | Promise<string>;
|
|
7
|
+
fromJSON: (jsonData: TJSONData, identifier: string) => TData | Promise<TData>;
|
|
8
|
+
toJSON: (value: TData, identifier: string) => TJSONData | Promise<TJSONData>;
|
|
9
|
+
validate: (oldValue: TData, newValue: TData, identifier: string) => void | Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
type StoreProxy<TData> = {
|
|
12
|
+
set(value: TData): Promise<void>;
|
|
13
|
+
get(): Promise<TData>;
|
|
14
|
+
getWithSet(setterFn: () => TData | Promise<TData>): Promise<TData>;
|
|
15
|
+
delete(): Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
export interface IMeshStore {
|
|
18
|
+
child(childIdentifier: string, flags?: Partial<StoreFlags>): IMeshStore;
|
|
19
|
+
proxy<TData>(id: string, options: ProxyOptions<TData>): StoreProxy<TData>;
|
|
20
|
+
}
|
|
21
|
+
export {};
|