@effect-gql/core 0.1.0 → 1.1.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/README.md +100 -0
- package/builder/index.cjs +1446 -0
- package/builder/index.cjs.map +1 -0
- package/builder/index.d.cts +260 -0
- package/{dist/builder/pipe-api.d.ts → builder/index.d.ts} +50 -21
- package/builder/index.js +1405 -0
- package/builder/index.js.map +1 -0
- package/index.cjs +3469 -0
- package/index.cjs.map +1 -0
- package/index.d.cts +529 -0
- package/index.d.ts +529 -0
- package/index.js +3292 -0
- package/index.js.map +1 -0
- package/package.json +19 -28
- package/schema-builder-DKvkzU_M.d.cts +965 -0
- package/schema-builder-DKvkzU_M.d.ts +965 -0
- package/server/index.cjs +1579 -0
- package/server/index.cjs.map +1 -0
- package/server/index.d.cts +682 -0
- package/server/index.d.ts +682 -0
- package/server/index.js +1548 -0
- package/server/index.js.map +1 -0
- package/dist/analyzer-extension.d.ts +0 -105
- package/dist/analyzer-extension.d.ts.map +0 -1
- package/dist/analyzer-extension.js +0 -137
- package/dist/analyzer-extension.js.map +0 -1
- package/dist/builder/execute.d.ts +0 -26
- package/dist/builder/execute.d.ts.map +0 -1
- package/dist/builder/execute.js +0 -104
- package/dist/builder/execute.js.map +0 -1
- package/dist/builder/field-builders.d.ts +0 -30
- package/dist/builder/field-builders.d.ts.map +0 -1
- package/dist/builder/field-builders.js +0 -200
- package/dist/builder/field-builders.js.map +0 -1
- package/dist/builder/index.d.ts +0 -7
- package/dist/builder/index.d.ts.map +0 -1
- package/dist/builder/index.js +0 -31
- package/dist/builder/index.js.map +0 -1
- package/dist/builder/pipe-api.d.ts.map +0 -1
- package/dist/builder/pipe-api.js +0 -151
- package/dist/builder/pipe-api.js.map +0 -1
- package/dist/builder/schema-builder.d.ts +0 -301
- package/dist/builder/schema-builder.d.ts.map +0 -1
- package/dist/builder/schema-builder.js +0 -566
- package/dist/builder/schema-builder.js.map +0 -1
- package/dist/builder/type-registry.d.ts +0 -80
- package/dist/builder/type-registry.d.ts.map +0 -1
- package/dist/builder/type-registry.js +0 -505
- package/dist/builder/type-registry.js.map +0 -1
- package/dist/builder/types.d.ts +0 -283
- package/dist/builder/types.d.ts.map +0 -1
- package/dist/builder/types.js +0 -3
- package/dist/builder/types.js.map +0 -1
- package/dist/cli/generate-schema.d.ts +0 -29
- package/dist/cli/generate-schema.d.ts.map +0 -1
- package/dist/cli/generate-schema.js +0 -233
- package/dist/cli/generate-schema.js.map +0 -1
- package/dist/cli/index.d.ts +0 -19
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -24
- package/dist/cli/index.js.map +0 -1
- package/dist/context.d.ts +0 -18
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js +0 -11
- package/dist/context.js.map +0 -1
- package/dist/error.d.ts +0 -45
- package/dist/error.d.ts.map +0 -1
- package/dist/error.js +0 -29
- package/dist/error.js.map +0 -1
- package/dist/extensions.d.ts +0 -130
- package/dist/extensions.d.ts.map +0 -1
- package/dist/extensions.js +0 -78
- package/dist/extensions.js.map +0 -1
- package/dist/index.d.ts +0 -12
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -47
- package/dist/index.js.map +0 -1
- package/dist/loader.d.ts +0 -169
- package/dist/loader.d.ts.map +0 -1
- package/dist/loader.js +0 -237
- package/dist/loader.js.map +0 -1
- package/dist/resolver-context.d.ts +0 -154
- package/dist/resolver-context.d.ts.map +0 -1
- package/dist/resolver-context.js +0 -184
- package/dist/resolver-context.js.map +0 -1
- package/dist/schema-mapping.d.ts +0 -30
- package/dist/schema-mapping.d.ts.map +0 -1
- package/dist/schema-mapping.js +0 -280
- package/dist/schema-mapping.js.map +0 -1
- package/dist/server/cache-control.d.ts +0 -96
- package/dist/server/cache-control.d.ts.map +0 -1
- package/dist/server/cache-control.js +0 -308
- package/dist/server/cache-control.js.map +0 -1
- package/dist/server/complexity.d.ts +0 -165
- package/dist/server/complexity.d.ts.map +0 -1
- package/dist/server/complexity.js +0 -433
- package/dist/server/complexity.js.map +0 -1
- package/dist/server/config.d.ts +0 -66
- package/dist/server/config.d.ts.map +0 -1
- package/dist/server/config.js +0 -104
- package/dist/server/config.js.map +0 -1
- package/dist/server/graphiql.d.ts +0 -5
- package/dist/server/graphiql.d.ts.map +0 -1
- package/dist/server/graphiql.js +0 -43
- package/dist/server/graphiql.js.map +0 -1
- package/dist/server/index.d.ts +0 -18
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/index.js +0 -48
- package/dist/server/index.js.map +0 -1
- package/dist/server/router.d.ts +0 -79
- package/dist/server/router.d.ts.map +0 -1
- package/dist/server/router.js +0 -232
- package/dist/server/router.js.map +0 -1
- package/dist/server/schema-builder-extensions.d.ts +0 -42
- package/dist/server/schema-builder-extensions.d.ts.map +0 -1
- package/dist/server/schema-builder-extensions.js +0 -48
- package/dist/server/schema-builder-extensions.js.map +0 -1
- package/dist/server/sse-adapter.d.ts +0 -64
- package/dist/server/sse-adapter.d.ts.map +0 -1
- package/dist/server/sse-adapter.js +0 -227
- package/dist/server/sse-adapter.js.map +0 -1
- package/dist/server/sse-types.d.ts +0 -192
- package/dist/server/sse-types.d.ts.map +0 -1
- package/dist/server/sse-types.js +0 -63
- package/dist/server/sse-types.js.map +0 -1
- package/dist/server/ws-adapter.d.ts +0 -39
- package/dist/server/ws-adapter.d.ts.map +0 -1
- package/dist/server/ws-adapter.js +0 -247
- package/dist/server/ws-adapter.js.map +0 -1
- package/dist/server/ws-types.d.ts +0 -169
- package/dist/server/ws-types.d.ts.map +0 -1
- package/dist/server/ws-types.js +0 -11
- package/dist/server/ws-types.js.map +0 -1
- package/dist/server/ws-utils.d.ts +0 -42
- package/dist/server/ws-utils.d.ts.map +0 -1
- package/dist/server/ws-utils.js +0 -99
- package/dist/server/ws-utils.js.map +0 -1
- package/src/analyzer-extension.ts +0 -254
- package/src/builder/execute.ts +0 -153
- package/src/builder/field-builders.ts +0 -322
- package/src/builder/index.ts +0 -48
- package/src/builder/pipe-api.ts +0 -312
- package/src/builder/schema-builder.ts +0 -970
- package/src/builder/type-registry.ts +0 -670
- package/src/builder/types.ts +0 -305
- package/src/context.ts +0 -23
- package/src/error.ts +0 -32
- package/src/extensions.ts +0 -240
- package/src/index.ts +0 -32
- package/src/loader.ts +0 -363
- package/src/resolver-context.ts +0 -253
- package/src/schema-mapping.ts +0 -307
- package/src/server/cache-control.ts +0 -590
- package/src/server/complexity.ts +0 -774
- package/src/server/config.ts +0 -174
- package/src/server/graphiql.ts +0 -38
- package/src/server/index.ts +0 -96
- package/src/server/router.ts +0 -432
- package/src/server/schema-builder-extensions.ts +0 -51
- package/src/server/sse-adapter.ts +0 -327
- package/src/server/sse-types.ts +0 -234
- package/src/server/ws-adapter.ts +0 -355
- package/src/server/ws-types.ts +0 -192
- package/src/server/ws-utils.ts +0 -136
package/dist/builder/types.d.ts
DELETED
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
import { Effect, Runtime, Stream } from "effect";
|
|
2
|
-
import * as S from "effect/Schema";
|
|
3
|
-
import { DirectiveLocation, GraphQLResolveInfo } from "graphql";
|
|
4
|
-
import type { FieldComplexity } from "../server/complexity";
|
|
5
|
-
/**
|
|
6
|
-
* Cache control scope determines whether a cached response can be shared.
|
|
7
|
-
* - PUBLIC: Response can be cached by CDNs and shared across users
|
|
8
|
-
* - PRIVATE: Response is user-specific and should only be cached in browsers
|
|
9
|
-
*/
|
|
10
|
-
export type CacheControlScope = "PUBLIC" | "PRIVATE";
|
|
11
|
-
/**
|
|
12
|
-
* Cache control hint for a type or field.
|
|
13
|
-
* Used to compute the overall cache policy for a GraphQL response.
|
|
14
|
-
*/
|
|
15
|
-
export interface CacheHint {
|
|
16
|
-
/**
|
|
17
|
-
* Maximum age in seconds that this field's value can be cached.
|
|
18
|
-
* The response's maxAge will be the minimum of all field maxAges.
|
|
19
|
-
*/
|
|
20
|
-
readonly maxAge?: number;
|
|
21
|
-
/**
|
|
22
|
-
* Whether the cached value is user-specific (PRIVATE) or shared (PUBLIC).
|
|
23
|
-
* If any field is PRIVATE, the entire response is PRIVATE.
|
|
24
|
-
*/
|
|
25
|
-
readonly scope?: CacheControlScope;
|
|
26
|
-
/**
|
|
27
|
-
* When true, this field inherits its maxAge from the parent field
|
|
28
|
-
* instead of using the default (which is 0 for root fields).
|
|
29
|
-
* Cannot be used together with maxAge.
|
|
30
|
-
*/
|
|
31
|
-
readonly inheritMaxAge?: boolean;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Configuration for a query or mutation field
|
|
35
|
-
*/
|
|
36
|
-
export interface FieldRegistration<Args = any, A = any, E = any, R = any> {
|
|
37
|
-
type: S.Schema<A, any, any>;
|
|
38
|
-
args?: S.Schema<Args, any, any>;
|
|
39
|
-
description?: string;
|
|
40
|
-
directives?: readonly DirectiveApplication[];
|
|
41
|
-
/**
|
|
42
|
-
* Complexity cost of this field.
|
|
43
|
-
* Can be a static number or a function that receives the resolved arguments.
|
|
44
|
-
* Used for query complexity limiting.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* // Static cost
|
|
48
|
-
* complexity: 5
|
|
49
|
-
*
|
|
50
|
-
* // Dynamic cost based on pagination
|
|
51
|
-
* complexity: (args) => args.limit * 2
|
|
52
|
-
*/
|
|
53
|
-
complexity?: FieldComplexity;
|
|
54
|
-
/**
|
|
55
|
-
* Cache control hint for this field.
|
|
56
|
-
* Used to compute HTTP Cache-Control headers for the response.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* // Cache for 1 hour
|
|
60
|
-
* cacheControl: { maxAge: 3600 }
|
|
61
|
-
*
|
|
62
|
-
* // User-specific data, don't cache in CDN
|
|
63
|
-
* cacheControl: { maxAge: 60, scope: "PRIVATE" }
|
|
64
|
-
*/
|
|
65
|
-
cacheControl?: CacheHint;
|
|
66
|
-
resolve: (args: Args) => Effect.Effect<A, E, R>;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Configuration for an object type
|
|
70
|
-
*/
|
|
71
|
-
export interface TypeRegistration {
|
|
72
|
-
name: string;
|
|
73
|
-
schema: S.Schema<any, any, any>;
|
|
74
|
-
implements?: readonly string[];
|
|
75
|
-
directives?: readonly DirectiveApplication[];
|
|
76
|
-
/**
|
|
77
|
-
* Default cache control hint for all fields returning this type.
|
|
78
|
-
* Can be overridden by field-level cacheControl.
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* // All User fields cacheable for 1 hour by default
|
|
82
|
-
* cacheControl: { maxAge: 3600 }
|
|
83
|
-
*/
|
|
84
|
-
cacheControl?: CacheHint;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Configuration for an interface type
|
|
88
|
-
*/
|
|
89
|
-
export interface InterfaceRegistration {
|
|
90
|
-
name: string;
|
|
91
|
-
schema: S.Schema<any, any, any>;
|
|
92
|
-
resolveType: (value: any) => string;
|
|
93
|
-
directives?: readonly DirectiveApplication[];
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Configuration for an enum type
|
|
97
|
-
*/
|
|
98
|
-
export interface EnumRegistration {
|
|
99
|
-
name: string;
|
|
100
|
-
values: readonly string[];
|
|
101
|
-
description?: string;
|
|
102
|
-
directives?: readonly DirectiveApplication[];
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Configuration for a union type
|
|
106
|
-
*/
|
|
107
|
-
export interface UnionRegistration {
|
|
108
|
-
name: string;
|
|
109
|
-
types: readonly string[];
|
|
110
|
-
resolveType: (value: any) => string;
|
|
111
|
-
directives?: readonly DirectiveApplication[];
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Configuration for an input type
|
|
115
|
-
*/
|
|
116
|
-
export interface InputTypeRegistration {
|
|
117
|
-
name: string;
|
|
118
|
-
schema: S.Schema<any, any, any>;
|
|
119
|
-
description?: string;
|
|
120
|
-
directives?: readonly DirectiveApplication[];
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* A reference to a directive applied to a type, field, or argument
|
|
124
|
-
*/
|
|
125
|
-
export interface DirectiveApplication {
|
|
126
|
-
readonly name: string;
|
|
127
|
-
readonly args?: Record<string, unknown>;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Configuration for a directive definition
|
|
131
|
-
*/
|
|
132
|
-
export interface DirectiveRegistration<Args = any, R = never> {
|
|
133
|
-
name: string;
|
|
134
|
-
description?: string;
|
|
135
|
-
locations: readonly DirectiveLocation[];
|
|
136
|
-
args?: S.Schema<Args, any, any>;
|
|
137
|
-
/**
|
|
138
|
-
* For executable directives - transforms the resolver Effect.
|
|
139
|
-
* Called with directive args, returns an Effect transformer.
|
|
140
|
-
*/
|
|
141
|
-
apply?: (args: Args) => <A, E, R2>(effect: Effect.Effect<A, E, R2>) => Effect.Effect<A, E, R | R2>;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Context passed to middleware apply functions
|
|
145
|
-
* Contains the resolver's parent value, arguments, and GraphQL resolve info
|
|
146
|
-
*/
|
|
147
|
-
export interface MiddlewareContext<Parent = any, Args = any> {
|
|
148
|
-
readonly parent: Parent;
|
|
149
|
-
readonly args: Args;
|
|
150
|
-
readonly info: GraphQLResolveInfo;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Configuration for middleware registration
|
|
154
|
-
*
|
|
155
|
-
* Middleware wraps all resolvers (or those matching a pattern) and executes
|
|
156
|
-
* in an "onion" model - first registered middleware is the outermost layer.
|
|
157
|
-
*
|
|
158
|
-
* Unlike directives which are applied per-field explicitly, middleware is
|
|
159
|
-
* applied globally or via pattern matching.
|
|
160
|
-
*
|
|
161
|
-
* @example
|
|
162
|
-
* ```typescript
|
|
163
|
-
* // Logging middleware - applies to all fields
|
|
164
|
-
* middleware({
|
|
165
|
-
* name: "logging",
|
|
166
|
-
* apply: (effect, ctx) => Effect.gen(function*() {
|
|
167
|
-
* yield* Effect.logInfo(`Resolving ${ctx.info.fieldName}`)
|
|
168
|
-
* return yield* effect
|
|
169
|
-
* })
|
|
170
|
-
* })
|
|
171
|
-
*
|
|
172
|
-
* // Admin-only middleware - pattern matched
|
|
173
|
-
* middleware({
|
|
174
|
-
* name: "adminOnly",
|
|
175
|
-
* match: (info) => info.fieldName.startsWith("admin"),
|
|
176
|
-
* apply: (effect) => Effect.gen(function*() {
|
|
177
|
-
* const auth = yield* AuthService
|
|
178
|
-
* yield* auth.requireAdmin()
|
|
179
|
-
* return yield* effect
|
|
180
|
-
* })
|
|
181
|
-
* })
|
|
182
|
-
* ```
|
|
183
|
-
*/
|
|
184
|
-
export interface MiddlewareRegistration<R = never> {
|
|
185
|
-
readonly name: string;
|
|
186
|
-
readonly description?: string;
|
|
187
|
-
/**
|
|
188
|
-
* Optional predicate to filter which fields this middleware applies to.
|
|
189
|
-
* If undefined, middleware applies to all fields.
|
|
190
|
-
* Receives the GraphQL resolve info for the field being resolved.
|
|
191
|
-
*/
|
|
192
|
-
readonly match?: (info: GraphQLResolveInfo) => boolean;
|
|
193
|
-
/**
|
|
194
|
-
* Transform the resolver Effect.
|
|
195
|
-
* Receives the resolver effect and full context (parent, args, info).
|
|
196
|
-
* Returns the transformed effect.
|
|
197
|
-
*
|
|
198
|
-
* Middleware executes in "onion" order - first registered is outermost.
|
|
199
|
-
*/
|
|
200
|
-
readonly apply: <A, E, R2>(effect: Effect.Effect<A, E, R2>, context: MiddlewareContext) => Effect.Effect<A, E, R | R2>;
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Configuration for a subscription field
|
|
204
|
-
* Returns a Stream that yields values over time
|
|
205
|
-
*/
|
|
206
|
-
export interface SubscriptionFieldRegistration<Args = any, A = any, E = any, R = any> {
|
|
207
|
-
type: S.Schema<A, any, any>;
|
|
208
|
-
args?: S.Schema<Args, any, any>;
|
|
209
|
-
description?: string;
|
|
210
|
-
directives?: readonly DirectiveApplication[];
|
|
211
|
-
/**
|
|
212
|
-
* Complexity cost of this subscription.
|
|
213
|
-
* Can be a static number or a function that receives the resolved arguments.
|
|
214
|
-
* Used for query complexity limiting.
|
|
215
|
-
*/
|
|
216
|
-
complexity?: FieldComplexity;
|
|
217
|
-
/**
|
|
218
|
-
* Cache control hint for this subscription.
|
|
219
|
-
* Note: Subscriptions are real-time and typically not cached,
|
|
220
|
-
* but this can be used for initial data hints.
|
|
221
|
-
*/
|
|
222
|
-
cacheControl?: CacheHint;
|
|
223
|
-
/**
|
|
224
|
-
* Subscribe function returns an Effect that produces a Stream.
|
|
225
|
-
* The Stream yields values that are passed to the resolve function.
|
|
226
|
-
*/
|
|
227
|
-
subscribe: (args: Args) => Effect.Effect<Stream.Stream<A, E, R>, E, R>;
|
|
228
|
-
/**
|
|
229
|
-
* Optional resolve function to transform each yielded value.
|
|
230
|
-
* If not provided, yields values directly.
|
|
231
|
-
*/
|
|
232
|
-
resolve?: (value: A, args: Args) => Effect.Effect<A, E, R>;
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Configuration for a field on an object type
|
|
236
|
-
*/
|
|
237
|
-
export interface ObjectFieldRegistration<Parent = any, Args = any, A = any, E = any, R = any> {
|
|
238
|
-
type: S.Schema<A, any, any>;
|
|
239
|
-
args?: S.Schema<Args, any, any>;
|
|
240
|
-
description?: string;
|
|
241
|
-
directives?: readonly DirectiveApplication[];
|
|
242
|
-
/**
|
|
243
|
-
* Complexity cost of this field.
|
|
244
|
-
* Can be a static number or a function that receives the resolved arguments.
|
|
245
|
-
* Used for query complexity limiting.
|
|
246
|
-
*
|
|
247
|
-
* @example
|
|
248
|
-
* // Relation field with pagination
|
|
249
|
-
* complexity: (args) => (args.limit ?? 10) * 2
|
|
250
|
-
*/
|
|
251
|
-
complexity?: FieldComplexity;
|
|
252
|
-
/**
|
|
253
|
-
* Cache control hint for this field.
|
|
254
|
-
* Used to compute HTTP Cache-Control headers for the response.
|
|
255
|
-
*
|
|
256
|
-
* @example
|
|
257
|
-
* // Expensive computation, cache for 5 minutes
|
|
258
|
-
* cacheControl: { maxAge: 300 }
|
|
259
|
-
*
|
|
260
|
-
* // Inherit cache policy from parent type
|
|
261
|
-
* cacheControl: { inheritMaxAge: true }
|
|
262
|
-
*/
|
|
263
|
-
cacheControl?: CacheHint;
|
|
264
|
-
resolve: (parent: Parent, args: Args) => Effect.Effect<A, E, R>;
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* GraphQL context that contains the Effect runtime
|
|
268
|
-
*/
|
|
269
|
-
export interface GraphQLEffectContext<R> {
|
|
270
|
-
runtime: Runtime.Runtime<R>;
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Type registries used during schema building
|
|
274
|
-
*/
|
|
275
|
-
export interface TypeRegistries {
|
|
276
|
-
types: Map<string, import("graphql").GraphQLObjectType>;
|
|
277
|
-
interfaces: Map<string, import("graphql").GraphQLInterfaceType>;
|
|
278
|
-
enums: Map<string, import("graphql").GraphQLEnumType>;
|
|
279
|
-
unions: Map<string, import("graphql").GraphQLUnionType>;
|
|
280
|
-
inputs: Map<string, import("graphql").GraphQLInputObjectType>;
|
|
281
|
-
directives: Map<string, import("graphql").GraphQLDirective>;
|
|
282
|
-
}
|
|
283
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/builder/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAChD,OAAO,KAAK,CAAC,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEpD;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,QAAQ,CAAC,MAAM,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AUG;IACH,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;CAChE;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,SAAS,EAAE,iBAAiB,CAAC,CAAA;IACvD,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,SAAS,EAAE,oBAAoB,CAAC,CAAA;IAC/D,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,SAAS,EAAE,eAAe,CAAC,CAAA;IACrD,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,SAAS,EAAE,gBAAgB,CAAC,CAAA;IACvD,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,SAAS,EAAE,sBAAsB,CAAC,CAAA;IAC7D,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,SAAS,EAAE,gBAAgB,CAAC,CAAA;CAC5D"}
|
package/dist/builder/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/builder/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* CLI tool for generating GraphQL SDL from an effect-gql schema builder.
|
|
4
|
-
*
|
|
5
|
-
* Usage:
|
|
6
|
-
* npx effect-gql-generate-schema ./src/schema.ts
|
|
7
|
-
* npx effect-gql-generate-schema ./src/schema.ts -o schema.graphql
|
|
8
|
-
* npx effect-gql-generate-schema ./src/schema.ts --watch
|
|
9
|
-
*
|
|
10
|
-
* The module should export one of:
|
|
11
|
-
* - `builder` - A GraphQLSchemaBuilder instance
|
|
12
|
-
* - `schema` - A GraphQLSchema instance
|
|
13
|
-
* - `default` - Either of the above as default export
|
|
14
|
-
*/
|
|
15
|
-
import { Effect } from "effect";
|
|
16
|
-
import { type GraphQLSchema } from "graphql";
|
|
17
|
-
/**
|
|
18
|
-
* Generate SDL from a schema
|
|
19
|
-
*/
|
|
20
|
-
export declare const generateSDL: (schema: GraphQLSchema, options?: {
|
|
21
|
-
sort?: boolean;
|
|
22
|
-
}) => string;
|
|
23
|
-
/**
|
|
24
|
-
* Generate SDL from a module path
|
|
25
|
-
*/
|
|
26
|
-
export declare const generateSDLFromModule: (modulePath: string, options?: {
|
|
27
|
-
sort?: boolean;
|
|
28
|
-
}) => Effect.Effect<string, Error>;
|
|
29
|
-
//# sourceMappingURL=generate-schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-schema.d.ts","sourceRoot":"","sources":["../../src/cli/generate-schema.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAW,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAwC,KAAK,aAAa,EAAE,MAAM,SAAS,CAAA;AAyElF;;GAEG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,aAAa,EACrB,UAAS;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,KAC/B,MAGF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,YAAY,MAAM,EAClB,UAAS;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,KAC/B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CACqD,CAAA"}
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
/**
|
|
4
|
-
* CLI tool for generating GraphQL SDL from an effect-gql schema builder.
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* npx effect-gql-generate-schema ./src/schema.ts
|
|
8
|
-
* npx effect-gql-generate-schema ./src/schema.ts -o schema.graphql
|
|
9
|
-
* npx effect-gql-generate-schema ./src/schema.ts --watch
|
|
10
|
-
*
|
|
11
|
-
* The module should export one of:
|
|
12
|
-
* - `builder` - A GraphQLSchemaBuilder instance
|
|
13
|
-
* - `schema` - A GraphQLSchema instance
|
|
14
|
-
* - `default` - Either of the above as default export
|
|
15
|
-
*/
|
|
16
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
19
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
20
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
21
|
-
}
|
|
22
|
-
Object.defineProperty(o, k2, desc);
|
|
23
|
-
}) : (function(o, m, k, k2) {
|
|
24
|
-
if (k2 === undefined) k2 = k;
|
|
25
|
-
o[k2] = m[k];
|
|
26
|
-
}));
|
|
27
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
28
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
29
|
-
}) : function(o, v) {
|
|
30
|
-
o["default"] = v;
|
|
31
|
-
});
|
|
32
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
33
|
-
var ownKeys = function(o) {
|
|
34
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
35
|
-
var ar = [];
|
|
36
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
37
|
-
return ar;
|
|
38
|
-
};
|
|
39
|
-
return ownKeys(o);
|
|
40
|
-
};
|
|
41
|
-
return function (mod) {
|
|
42
|
-
if (mod && mod.__esModule) return mod;
|
|
43
|
-
var result = {};
|
|
44
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
45
|
-
__setModuleDefault(result, mod);
|
|
46
|
-
return result;
|
|
47
|
-
};
|
|
48
|
-
})();
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.generateSDLFromModule = exports.generateSDL = void 0;
|
|
51
|
-
const effect_1 = require("effect");
|
|
52
|
-
const graphql_1 = require("graphql");
|
|
53
|
-
const fs = __importStar(require("fs"));
|
|
54
|
-
const path = __importStar(require("path"));
|
|
55
|
-
/**
|
|
56
|
-
* Load a schema from a module path.
|
|
57
|
-
* Supports both GraphQLSchemaBuilder and GraphQLSchema exports.
|
|
58
|
-
*/
|
|
59
|
-
const loadSchema = (modulePath) => effect_1.Effect.gen(function* () {
|
|
60
|
-
const absolutePath = path.resolve(process.cwd(), modulePath);
|
|
61
|
-
// Validate file exists
|
|
62
|
-
if (!fs.existsSync(absolutePath)) {
|
|
63
|
-
return yield* effect_1.Effect.fail(new Error(`File not found: ${absolutePath}`));
|
|
64
|
-
}
|
|
65
|
-
// Dynamic import (works with both ESM and CJS via tsx/ts-node)
|
|
66
|
-
const module = yield* effect_1.Effect.tryPromise({
|
|
67
|
-
try: async () => {
|
|
68
|
-
// Clear require cache for watch mode
|
|
69
|
-
const resolved = require.resolve(absolutePath);
|
|
70
|
-
delete require.cache[resolved];
|
|
71
|
-
// Try dynamic import first (ESM), fall back to require (CJS)
|
|
72
|
-
try {
|
|
73
|
-
return await Promise.resolve(`${absolutePath}`).then(s => __importStar(require(s)));
|
|
74
|
-
}
|
|
75
|
-
catch {
|
|
76
|
-
return require(absolutePath);
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
catch: (error) => new Error(`Failed to load module: ${error}`),
|
|
80
|
-
});
|
|
81
|
-
// Look for builder or schema export
|
|
82
|
-
const exported = module.builder ?? module.schema ?? module.default;
|
|
83
|
-
if (!exported) {
|
|
84
|
-
return yield* effect_1.Effect.fail(new Error(`Module must export 'builder' (GraphQLSchemaBuilder), 'schema' (GraphQLSchema), or a default export`));
|
|
85
|
-
}
|
|
86
|
-
// If it's a builder, call buildSchema()
|
|
87
|
-
if (typeof exported.buildSchema === "function") {
|
|
88
|
-
return exported.buildSchema();
|
|
89
|
-
}
|
|
90
|
-
// If it's already a GraphQLSchema
|
|
91
|
-
if (exported.getQueryType && exported.getTypeMap) {
|
|
92
|
-
return exported;
|
|
93
|
-
}
|
|
94
|
-
return yield* effect_1.Effect.fail(new Error(`Export is not a GraphQLSchemaBuilder or GraphQLSchema. Got: ${typeof exported}`));
|
|
95
|
-
});
|
|
96
|
-
/**
|
|
97
|
-
* Generate SDL from a schema
|
|
98
|
-
*/
|
|
99
|
-
const generateSDL = (schema, options = {}) => {
|
|
100
|
-
const finalSchema = options.sort ? (0, graphql_1.lexicographicSortSchema)(schema) : schema;
|
|
101
|
-
return (0, graphql_1.printSchema)(finalSchema);
|
|
102
|
-
};
|
|
103
|
-
exports.generateSDL = generateSDL;
|
|
104
|
-
/**
|
|
105
|
-
* Generate SDL from a module path
|
|
106
|
-
*/
|
|
107
|
-
const generateSDLFromModule = (modulePath, options = {}) => loadSchema(modulePath).pipe(effect_1.Effect.map((schema) => (0, exports.generateSDL)(schema, options)));
|
|
108
|
-
exports.generateSDLFromModule = generateSDLFromModule;
|
|
109
|
-
/**
|
|
110
|
-
* Run the CLI
|
|
111
|
-
*/
|
|
112
|
-
const run = (options) => effect_1.Effect.gen(function* () {
|
|
113
|
-
const schema = yield* loadSchema(options.modulePath);
|
|
114
|
-
const sdl = (0, exports.generateSDL)(schema, { sort: options.sort });
|
|
115
|
-
if (options.output) {
|
|
116
|
-
const outputPath = path.resolve(process.cwd(), options.output);
|
|
117
|
-
fs.writeFileSync(outputPath, sdl);
|
|
118
|
-
yield* effect_1.Console.log(`Schema written to ${outputPath}`);
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
yield* effect_1.Console.log(sdl);
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
/**
|
|
125
|
-
* Watch mode - regenerate on file changes
|
|
126
|
-
*/
|
|
127
|
-
const watch = (options) => effect_1.Effect.gen(function* () {
|
|
128
|
-
const absolutePath = path.resolve(process.cwd(), options.modulePath);
|
|
129
|
-
const dir = path.dirname(absolutePath);
|
|
130
|
-
yield* effect_1.Console.log(`Watching for changes in ${dir}...`);
|
|
131
|
-
// Initial generation
|
|
132
|
-
yield* run(options).pipe(effect_1.Effect.catchAll((error) => effect_1.Console.error(`Error: ${error.message}`)));
|
|
133
|
-
// Watch for changes
|
|
134
|
-
yield* effect_1.Effect.async(() => {
|
|
135
|
-
const watcher = fs.watch(dir, { recursive: true }, (_, filename) => {
|
|
136
|
-
if (filename?.endsWith(".ts") || filename?.endsWith(".js")) {
|
|
137
|
-
effect_1.Effect.runPromise(run(options).pipe(effect_1.Effect.tap(() => effect_1.Console.log(`\nRegenerated at ${new Date().toLocaleTimeString()}`)), effect_1.Effect.catchAll((error) => effect_1.Console.error(`Error: ${error.message}`))));
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
return effect_1.Effect.sync(() => watcher.close());
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
/**
|
|
144
|
-
* Parse CLI arguments
|
|
145
|
-
*/
|
|
146
|
-
const parseArgs = (args) => {
|
|
147
|
-
const positional = [];
|
|
148
|
-
let output;
|
|
149
|
-
let sort = true;
|
|
150
|
-
let watchMode = false;
|
|
151
|
-
for (let i = 0; i < args.length; i++) {
|
|
152
|
-
const arg = args[i];
|
|
153
|
-
if (arg === "-h" || arg === "--help") {
|
|
154
|
-
return { help: true };
|
|
155
|
-
}
|
|
156
|
-
else if (arg === "-o" || arg === "--output") {
|
|
157
|
-
output = args[++i];
|
|
158
|
-
}
|
|
159
|
-
else if (arg === "--no-sort") {
|
|
160
|
-
sort = false;
|
|
161
|
-
}
|
|
162
|
-
else if (arg === "-w" || arg === "--watch") {
|
|
163
|
-
watchMode = true;
|
|
164
|
-
}
|
|
165
|
-
else if (!arg.startsWith("-")) {
|
|
166
|
-
positional.push(arg);
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
return { error: `Unknown option: ${arg}` };
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
if (positional.length === 0) {
|
|
173
|
-
return { error: "Missing module path" };
|
|
174
|
-
}
|
|
175
|
-
return {
|
|
176
|
-
modulePath: positional[0],
|
|
177
|
-
output,
|
|
178
|
-
sort,
|
|
179
|
-
watch: watchMode,
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
|
-
const printHelp = () => {
|
|
183
|
-
console.log(`
|
|
184
|
-
Usage: effect-gql-generate-schema <module-path> [options]
|
|
185
|
-
|
|
186
|
-
Generate GraphQL SDL from an effect-gql schema builder.
|
|
187
|
-
|
|
188
|
-
Arguments:
|
|
189
|
-
module-path Path to the schema module (.ts or .js)
|
|
190
|
-
|
|
191
|
-
Options:
|
|
192
|
-
-o, --output Write SDL to file instead of stdout
|
|
193
|
-
--no-sort Don't sort schema alphabetically
|
|
194
|
-
-w, --watch Watch for changes and regenerate
|
|
195
|
-
-h, --help Show this help message
|
|
196
|
-
|
|
197
|
-
Examples:
|
|
198
|
-
npx effect-gql-generate-schema ./src/schema.ts
|
|
199
|
-
npx effect-gql-generate-schema ./src/schema.ts -o schema.graphql
|
|
200
|
-
npx effect-gql-generate-schema ./src/schema.ts --watch -o schema.graphql
|
|
201
|
-
|
|
202
|
-
The module should export one of:
|
|
203
|
-
- builder: A GraphQLSchemaBuilder instance
|
|
204
|
-
- schema: A GraphQLSchema instance
|
|
205
|
-
- default: Either of the above as default export
|
|
206
|
-
`);
|
|
207
|
-
};
|
|
208
|
-
// Main entry point
|
|
209
|
-
const main = effect_1.Effect.gen(function* () {
|
|
210
|
-
const args = process.argv.slice(2);
|
|
211
|
-
const parsed = parseArgs(args);
|
|
212
|
-
if ("help" in parsed) {
|
|
213
|
-
printHelp();
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
if ("error" in parsed) {
|
|
217
|
-
yield* effect_1.Console.error(`Error: ${parsed.error}`);
|
|
218
|
-
printHelp();
|
|
219
|
-
process.exitCode = 1;
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
if (parsed.watch) {
|
|
223
|
-
yield* watch(parsed);
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
yield* run(parsed);
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
// Run if this is the main module
|
|
230
|
-
if (require.main === module || process.argv[1]?.includes("generate-schema")) {
|
|
231
|
-
effect_1.Effect.runPromise(main.pipe(effect_1.Effect.catchAll((error) => effect_1.Console.error(`Error: ${error.message}`).pipe(effect_1.Effect.andThen(effect_1.Effect.sync(() => { process.exitCode = 1; }))))));
|
|
232
|
-
}
|
|
233
|
-
//# sourceMappingURL=generate-schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-schema.js","sourceRoot":"","sources":["../../src/cli/generate-schema.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;GAYG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,mCAAwC;AACxC,qCAAkF;AAClF,uCAAwB;AACxB,2CAA4B;AAa5B;;;GAGG;AACH,MAAM,UAAU,GAAG,CAAC,UAAkB,EAAuC,EAAE,CAC7E,eAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,CAAA;IAE5D,uBAAuB;IACvB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACjC,OAAO,KAAK,CAAC,CAAC,eAAM,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,mBAAmB,YAAY,EAAE,CAAC,CAAC,CAAA;IACzE,CAAC;IAED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;IAC5E,eAAM,CAAC,UAAU,CACf,IAAI,CAAC,IAAI,CACP,eAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CACxB,gBAAO,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAC3C,eAAM,CAAC,OAAO,CAAC,eAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC,CAC5D,CACF,CACF,CACF,CAAA;AACH,CAAC"}
|
package/dist/cli/index.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI utilities for effect-gql
|
|
3
|
-
*
|
|
4
|
-
* @example Programmatic SDL generation
|
|
5
|
-
* ```typescript
|
|
6
|
-
* import { generateSDL, generateSDLFromModule } from "@effect-gql/core/cli"
|
|
7
|
-
* import { Effect } from "effect"
|
|
8
|
-
*
|
|
9
|
-
* // From a builder
|
|
10
|
-
* const sdl = generateSDL(builder.buildSchema())
|
|
11
|
-
*
|
|
12
|
-
* // From a module path
|
|
13
|
-
* const sdl = await Effect.runPromise(
|
|
14
|
-
* generateSDLFromModule("./src/schema.ts")
|
|
15
|
-
* )
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export { generateSDL, generateSDLFromModule } from "./generate-schema";
|
|
19
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/cli/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA"}
|
package/dist/cli/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* CLI utilities for effect-gql
|
|
4
|
-
*
|
|
5
|
-
* @example Programmatic SDL generation
|
|
6
|
-
* ```typescript
|
|
7
|
-
* import { generateSDL, generateSDLFromModule } from "@effect-gql/core/cli"
|
|
8
|
-
* import { Effect } from "effect"
|
|
9
|
-
*
|
|
10
|
-
* // From a builder
|
|
11
|
-
* const sdl = generateSDL(builder.buildSchema())
|
|
12
|
-
*
|
|
13
|
-
* // From a module path
|
|
14
|
-
* const sdl = await Effect.runPromise(
|
|
15
|
-
* generateSDLFromModule("./src/schema.ts")
|
|
16
|
-
* )
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.generateSDLFromModule = exports.generateSDL = void 0;
|
|
21
|
-
var generate_schema_1 = require("./generate-schema");
|
|
22
|
-
Object.defineProperty(exports, "generateSDL", { enumerable: true, get: function () { return generate_schema_1.generateSDL; } });
|
|
23
|
-
Object.defineProperty(exports, "generateSDLFromModule", { enumerable: true, get: function () { return generate_schema_1.generateSDLFromModule; } });
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cli/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,qDAAsE;AAA7D,8GAAA,WAAW,OAAA;AAAE,wHAAA,qBAAqB,OAAA"}
|
package/dist/context.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Context, Layer } from "effect";
|
|
2
|
-
/**
|
|
3
|
-
* GraphQL request context containing request-specific data
|
|
4
|
-
*/
|
|
5
|
-
export interface GraphQLRequestContext {
|
|
6
|
-
readonly request: {
|
|
7
|
-
readonly headers: Record<string, string>;
|
|
8
|
-
readonly query: string;
|
|
9
|
-
readonly variables?: Record<string, unknown>;
|
|
10
|
-
readonly operationName?: string;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export declare const GraphQLRequestContext: Context.Tag<GraphQLRequestContext, GraphQLRequestContext>;
|
|
14
|
-
/**
|
|
15
|
-
* Create a layer from request context
|
|
16
|
-
*/
|
|
17
|
-
export declare const makeRequestContextLayer: (context: GraphQLRequestContext) => Layer.Layer<GraphQLRequestContext>;
|
|
18
|
-
//# sourceMappingURL=context.d.ts.map
|
package/dist/context.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAEvC;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QAC5C,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAChC,CAAA;CACF;AAED,eAAO,MAAM,qBAAqB,2DACkC,CAAA;AAEpE;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,qBAAqB,KAC7B,KAAK,CAAC,KAAK,CAAC,qBAAqB,CAAkD,CAAA"}
|
package/dist/context.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeRequestContextLayer = exports.GraphQLRequestContext = void 0;
|
|
4
|
-
const effect_1 = require("effect");
|
|
5
|
-
exports.GraphQLRequestContext = effect_1.Context.GenericTag("GraphQLRequestContext");
|
|
6
|
-
/**
|
|
7
|
-
* Create a layer from request context
|
|
8
|
-
*/
|
|
9
|
-
const makeRequestContextLayer = (context) => effect_1.Layer.succeed(exports.GraphQLRequestContext, context);
|
|
10
|
-
exports.makeRequestContextLayer = makeRequestContextLayer;
|
|
11
|
-
//# sourceMappingURL=context.js.map
|
package/dist/context.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;AAAA,mCAAuC;AAc1B,QAAA,qBAAqB,GAChC,gBAAO,CAAC,UAAU,CAAwB,uBAAuB,CAAC,CAAA;AAEpE;;GAEG;AACI,MAAM,uBAAuB,GAAG,CACrC,OAA8B,EACM,EAAE,CAAC,cAAK,CAAC,OAAO,CAAC,6BAAqB,EAAE,OAAO,CAAC,CAAA;AAFzE,QAAA,uBAAuB,2BAEkD"}
|