@kubun/graphql 0.8.1 → 0.8.2

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/lib/context.d.ts CHANGED
@@ -173,4 +173,22 @@ export type MutationContext = {
173
173
  success: boolean;
174
174
  };
175
175
  };
176
- export type Context = ReadOnlyContext & MutationContext;
176
+ /**
177
+ * Extension point for plugins to contribute typed fields to the GraphQL
178
+ * resolver context. Plugins augment this interface via module declaration
179
+ * merging:
180
+ *
181
+ * declare module '@kubun/graphql' {
182
+ * interface PluginContextMap {
183
+ * myPlugin: MyPluginContext
184
+ * }
185
+ * }
186
+ *
187
+ * At runtime, engine merges each plugin's context factory output under its
188
+ * `name` key. Fields are `Partial<>` because plugins are optional at build
189
+ * time — consumers use optional chaining or assert when the plugin is
190
+ * known to be wired.
191
+ */
192
+ export interface PluginContextMap {
193
+ }
194
+ export type Context = ReadOnlyContext & MutationContext & Partial<PluginContextMap>;
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type { AccessWarning, ComplexityStats, Context, CreateMutationParams, DocumentEventEmitter, DocumentSavedEvent, MutationContext, QueryContext, ReadContextDB, ReadContextParams, ReadOnlyContext, RemoveMutationParams, SetDocumentAccessOverrideParams, SetModelAccessDefaultsParams, SetMutationParams, SubscriptionContext, UpdateMutationParams, } from './context.js';
1
+ export type { AccessWarning, ComplexityStats, Context, CreateMutationParams, DocumentEventEmitter, DocumentSavedEvent, MutationContext, PluginContextMap, QueryContext, ReadContextDB, ReadContextParams, ReadOnlyContext, RemoveMutationParams, SetDocumentAccessOverrideParams, SetModelAccessDefaultsParams, SetMutationParams, SubscriptionContext, UpdateMutationParams, } from './context.js';
2
2
  export { createReadContext } from './context.js';
3
3
  export { GraphQLAttachmentID, GraphQLDocID } from './identifiers.js';
4
4
  export type { ExtensionResolvers, SchemaBuilderParams, SharedDefinitions, } from './schema.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubun/graphql",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "license": "see LICENSE.md",
5
5
  "keywords": [],
6
6
  "type": "module",
@@ -15,7 +15,7 @@
15
15
  ],
16
16
  "sideEffects": false,
17
17
  "dependencies": {
18
- "@enkaku/async": "^0.14.0",
18
+ "@enkaku/async": "^0.14.1",
19
19
  "@enkaku/codec": "^0.14.0",
20
20
  "@enkaku/event": "^0.14.1",
21
21
  "@enkaku/otel": "^0.14.0",
@@ -26,7 +26,7 @@
26
26
  "multiformats": "^13.4.2",
27
27
  "@kubun/hlc": "^0.8.0",
28
28
  "@kubun/id": "^0.8.0",
29
- "@kubun/protocol": "^0.8.0"
29
+ "@kubun/protocol": "^0.8.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@enkaku/capability": "^0.14.0",