@fluojs/graphql 1.0.0-beta.3 → 1.0.0-beta.5
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.ko.md +5 -2
- package/README.md +5 -2
- package/dist/decorators.d.ts +33 -1
- package/dist/decorators.d.ts.map +1 -1
- package/dist/decorators.js +43 -2
- package/dist/discovery.d.ts +7 -0
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +8 -1
- package/dist/metadata.d.ts +61 -0
- package/dist/metadata.d.ts.map +1 -1
- package/dist/metadata.js +70 -1
- package/dist/module.d.ts +3 -0
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +4 -0
- package/dist/schema/schema.d.ts +18 -0
- package/dist/schema/schema.d.ts.map +1 -1
- package/dist/schema/schema.js +20 -0
- package/dist/service.d.ts +1 -0
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +34 -10
- package/dist/transport/transport.d.ts +19 -0
- package/dist/transport/transport.d.ts.map +1 -1
- package/dist/transport/transport.js +86 -19
- package/dist/types.d.ts +5 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/package.json +6 -6
package/README.ko.md
CHANGED
|
@@ -25,7 +25,7 @@ pnpm add @fluojs/graphql graphql graphql-yoga
|
|
|
25
25
|
## 사용 시점
|
|
26
26
|
|
|
27
27
|
- TypeScript 데코레이터를 사용하여 타입 안전한 GraphQL API를 구축할 때 (**Code-first**).
|
|
28
|
-
-
|
|
28
|
+
- 기존의 executable `GraphQLSchema` 객체를 fluo 애플리케이션에 통합할 때.
|
|
29
29
|
- GraphQL resolver 내에서 request-scoped provider를 포함한 원활한 의존성 주입이 필요할 때.
|
|
30
30
|
- Request-scoped **DataLoader** 패턴을 사용하여 효율적인 데이터 페칭을 수행할 때.
|
|
31
31
|
|
|
@@ -73,6 +73,8 @@ await app.listen(3000);
|
|
|
73
73
|
### Code-first Resolvers
|
|
74
74
|
fluo는 표준 데코레이터를 사용하여 GraphQL 스키마를 정의합니다. `@Resolver`, `@Query`, `@Mutation`, `@Subscription`을 사용하여 클래스 메서드를 GraphQL 작업에 매핑합니다. GraphQL 인자는 input DTO 필드에 `@Arg(...)`로 선언하고, resolver 메서드는 작업의 `input` 옵션을 통해 해당 DTO를 받습니다.
|
|
75
75
|
|
|
76
|
+
현재 `@fluojs/graphql` 런타임은 root operation resolver만 지원합니다. `author(book, context)` 같은 object field resolver 패턴은 아직 런타임 계약이 아니라 `packages/graphql/field-resolver-rfc.md`에 정리된 설계 초안입니다.
|
|
77
|
+
|
|
76
78
|
### Request-Scoped DataLoaders
|
|
77
79
|
내장된 DataLoader 통합을 통해 N+1 문제를 효율적으로 해결합니다. Loader는 각 GraphQL 작업마다 자동으로 격리됩니다.
|
|
78
80
|
|
|
@@ -131,7 +133,7 @@ class RequestResolver {
|
|
|
131
133
|
### 프로토콜 지원
|
|
132
134
|
- **HTTP**: 표준 GET/POST 쿼리 및 뮤테이션.
|
|
133
135
|
- **SSE**: Server-Sent Events를 통한 구독(기본값).
|
|
134
|
-
- **WebSockets**:
|
|
136
|
+
- **WebSockets**: 활성 adapter가 upgrade listener를 지원하는 Node HTTP/S 서버를 노출할 때(예: Node HTTP adapter) 사용할 수 있는 선택적 `graphql-ws` 실시간 구독 지원.
|
|
135
137
|
|
|
136
138
|
```typescript
|
|
137
139
|
GraphqlModule.forRoot({
|
|
@@ -152,6 +154,7 @@ GraphqlModule.forRoot({
|
|
|
152
154
|
|
|
153
155
|
- `graphiql`을 명시적으로 켜거나 `introspection: true`를 설정하지 않으면 스키마 introspection은 기본적으로 비활성화됩니다.
|
|
154
156
|
- 문서 depth, field complexity, aggregate query cost에 대한 request validation budget이 기본적으로 보수적인 값으로 활성화됩니다.
|
|
157
|
+
- Streaming GraphQL 응답은 downstream response stream이 닫히거나 오류를 내면 upstream fetch body를 cancel하므로 SSE subscription 리소스를 즉시 해제합니다.
|
|
155
158
|
- WebSocket 구독 경로에는 별도의 전송 budget이 기본 적용됩니다: 동시 연결 `100`, 최대 payload 크기 `64 KiB`, 연결당 활성 operation `25`개입니다.
|
|
156
159
|
- 무제한 WebSocket 동작이 정말 필요할 때만 `subscriptions.websocket.limits = false`를 사용하고, 그 경우에도 동일한 수준의 외부 제어 수단을 마련해야 합니다.
|
|
157
160
|
- 무제한 동작이 꼭 필요할 때만 `limits: false`를 사용하고, 그 경우에는 외부 제어 수단을 함께 두어야 합니다.
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ pnpm add @fluojs/graphql graphql graphql-yoga
|
|
|
25
25
|
## When to Use
|
|
26
26
|
|
|
27
27
|
- When building type-safe GraphQL APIs using TypeScript decorators (**Code-first**).
|
|
28
|
-
- When integrating existing
|
|
28
|
+
- When integrating an existing executable `GraphQLSchema` object into a fluo application.
|
|
29
29
|
- When you need seamless dependency injection within GraphQL resolvers, including request-scoped providers.
|
|
30
30
|
- When performing efficient data fetching using request-scoped **DataLoader** patterns.
|
|
31
31
|
|
|
@@ -73,6 +73,8 @@ await app.listen(3000);
|
|
|
73
73
|
### Code-first Resolvers
|
|
74
74
|
fluo uses standard decorators to define your GraphQL schema. Use `@Resolver`, `@Query`, `@Mutation`, and `@Subscription` to map class methods to GraphQL operations. GraphQL arguments are declared on input DTO fields with `@Arg(...)`, then passed to the resolver method through the operation `input` option.
|
|
75
75
|
|
|
76
|
+
`@fluojs/graphql` currently supports root operation resolvers only. Object field-resolver patterns such as `author(book, context)` remain design-only and are documented in `packages/graphql/field-resolver-rfc.md`, not in the runtime contract.
|
|
77
|
+
|
|
76
78
|
### Request-Scoped DataLoaders
|
|
77
79
|
Efficiently solve the N+1 problem with built-in DataLoader integration. Loaders are automatically isolated per GraphQL operation.
|
|
78
80
|
|
|
@@ -131,7 +133,7 @@ class RequestResolver {
|
|
|
131
133
|
### Protocol Support
|
|
132
134
|
- **HTTP**: Standard GET/POST queries and mutations.
|
|
133
135
|
- **SSE**: Subscriptions over Server-Sent Events (default).
|
|
134
|
-
- **WebSockets**: Optional `graphql-ws` support for real-time subscriptions.
|
|
136
|
+
- **WebSockets**: Optional `graphql-ws` support for real-time subscriptions when the active adapter exposes a Node HTTP/S server with upgrade listeners (for example, the Node HTTP adapter).
|
|
135
137
|
|
|
136
138
|
```typescript
|
|
137
139
|
GraphqlModule.forRoot({
|
|
@@ -152,6 +154,7 @@ GraphqlModule.forRoot({
|
|
|
152
154
|
|
|
153
155
|
- Schema introspection is disabled by default unless you explicitly enable `graphiql` or set `introspection: true`.
|
|
154
156
|
- Request validation budgets are enabled by default with conservative limits for document depth, field complexity, and aggregate query cost.
|
|
157
|
+
- Streaming GraphQL responses cancel the upstream fetch body when the downstream response stream closes or errors, so SSE subscription resources are released promptly.
|
|
155
158
|
- WebSocket subscriptions use separate transport budgets by default: `100` concurrent connections, `64 KiB` maximum payload size, and `25` active operations per connection.
|
|
156
159
|
- Set `subscriptions.websocket.limits = false` only when you intentionally need unbounded websocket behavior and can enforce equivalent controls elsewhere.
|
|
157
160
|
- Pass `limits: false` only when you intentionally need unbounded behavior and can compensate with external controls.
|
package/dist/decorators.d.ts
CHANGED
|
@@ -2,20 +2,52 @@ import type { GraphqlArgType, GraphqlRootOutputType } from './types.js';
|
|
|
2
2
|
type StandardClassDecoratorFn = (value: Function, context: ClassDecoratorContext) => void;
|
|
3
3
|
type StandardMethodDecoratorFn = (value: Function, context: ClassMethodDecoratorContext) => void;
|
|
4
4
|
type StandardFieldDecoratorFn = <This, Value>(value: undefined, context: ClassFieldDecoratorContext<This, Value>) => void;
|
|
5
|
+
/**
|
|
6
|
+
* Describes the resolver method options contract.
|
|
7
|
+
*/
|
|
5
8
|
export interface ResolverMethodOptions {
|
|
6
9
|
fieldName?: string;
|
|
7
10
|
input?: Function;
|
|
8
|
-
topics?: string | string[];
|
|
9
11
|
argTypes?: Record<string, GraphqlArgType>;
|
|
10
12
|
outputType?: GraphqlRootOutputType;
|
|
11
13
|
}
|
|
12
14
|
type ClassDecoratorLike = StandardClassDecoratorFn;
|
|
13
15
|
type MethodDecoratorLike = StandardMethodDecoratorFn;
|
|
14
16
|
type FieldDecoratorLike = StandardFieldDecoratorFn;
|
|
17
|
+
/**
|
|
18
|
+
* Resolver.
|
|
19
|
+
*
|
|
20
|
+
* @param typeName The type name.
|
|
21
|
+
* @returns The resolver result.
|
|
22
|
+
*/
|
|
15
23
|
export declare function Resolver(typeName?: string): ClassDecoratorLike;
|
|
24
|
+
/**
|
|
25
|
+
* Query.
|
|
26
|
+
*
|
|
27
|
+
* @param fieldNameOrOptions The field name or options.
|
|
28
|
+
* @returns The query result.
|
|
29
|
+
*/
|
|
16
30
|
export declare function Query(fieldNameOrOptions?: string | ResolverMethodOptions): MethodDecoratorLike;
|
|
31
|
+
/**
|
|
32
|
+
* Mutation.
|
|
33
|
+
*
|
|
34
|
+
* @param fieldNameOrOptions The field name or options.
|
|
35
|
+
* @returns The mutation result.
|
|
36
|
+
*/
|
|
17
37
|
export declare function Mutation(fieldNameOrOptions?: string | ResolverMethodOptions): MethodDecoratorLike;
|
|
38
|
+
/**
|
|
39
|
+
* Subscription.
|
|
40
|
+
*
|
|
41
|
+
* @param fieldNameOrOptions The field name or options.
|
|
42
|
+
* @returns The subscription result.
|
|
43
|
+
*/
|
|
18
44
|
export declare function Subscription(fieldNameOrOptions?: string | ResolverMethodOptions): MethodDecoratorLike;
|
|
45
|
+
/**
|
|
46
|
+
* Arg.
|
|
47
|
+
*
|
|
48
|
+
* @param argName The arg name.
|
|
49
|
+
* @returns The arg result.
|
|
50
|
+
*/
|
|
19
51
|
export declare function Arg(argName?: string): FieldDecoratorLike;
|
|
20
52
|
export {};
|
|
21
53
|
//# sourceMappingURL=decorators.d.ts.map
|
package/dist/decorators.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../src/decorators.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAoB,cAAc,EAAE,qBAAqB,EAA6C,MAAM,YAAY,CAAC;AAGrI,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AAyB,CAAC;AACrD,KAAK,kBAAkB,GAAG,wBAAwB,CAAC;AAwGnD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAQ9D;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,qBAAqB,GAAG,mBAAmB,CAE9F;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,qBAAqB,GAAG,mBAAmB,CAEjG;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,qBAAqB,GAAG,mBAAmB,CAErG;AAED;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAmBxD"}
|
package/dist/decorators.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { metadataSymbol } from '@fluojs/core/internal';
|
|
2
2
|
import { argMetadataSymbol, handlerMetadataSymbol, resolverMetadataSymbol } from './metadata.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Describes the resolver method options contract.
|
|
6
|
+
*/
|
|
7
|
+
|
|
3
8
|
function getStandardMetadataBag(metadata) {
|
|
4
9
|
void metadataSymbol;
|
|
5
10
|
return metadata;
|
|
@@ -23,12 +28,14 @@ function normalizeMethodMetadata(type, fieldNameOrOptions) {
|
|
|
23
28
|
type
|
|
24
29
|
};
|
|
25
30
|
}
|
|
31
|
+
if ('topics' in fieldNameOrOptions) {
|
|
32
|
+
throw new Error('Resolver method option "topics" is not supported. GraphQL subscriptions must return an AsyncIterable directly until topic routing becomes a documented runtime feature.');
|
|
33
|
+
}
|
|
26
34
|
return {
|
|
27
35
|
argTypes: fieldNameOrOptions.argTypes,
|
|
28
36
|
fieldName: fieldNameOrOptions.fieldName?.trim() || undefined,
|
|
29
37
|
inputClass: fieldNameOrOptions.input,
|
|
30
38
|
outputType: fieldNameOrOptions.outputType,
|
|
31
|
-
topics: fieldNameOrOptions.topics,
|
|
32
39
|
type
|
|
33
40
|
};
|
|
34
41
|
}
|
|
@@ -47,7 +54,6 @@ function defineStandardHandlerMetadata(metadata, propertyKey, handlerMetadata) {
|
|
|
47
54
|
fieldName: handlerMetadata.fieldName,
|
|
48
55
|
inputClass: handlerMetadata.inputClass,
|
|
49
56
|
outputType: handlerMetadata.outputType,
|
|
50
|
-
topics: handlerMetadata.topics,
|
|
51
57
|
type: handlerMetadata.type
|
|
52
58
|
});
|
|
53
59
|
bag[handlerMetadataSymbol] = map;
|
|
@@ -76,6 +82,13 @@ function createMethodDecorator(type, fieldNameOrOptions) {
|
|
|
76
82
|
};
|
|
77
83
|
return decorator;
|
|
78
84
|
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Resolver.
|
|
88
|
+
*
|
|
89
|
+
* @param typeName The type name.
|
|
90
|
+
* @returns The resolver result.
|
|
91
|
+
*/
|
|
79
92
|
export function Resolver(typeName) {
|
|
80
93
|
const decorator = (value, context) => {
|
|
81
94
|
defineStandardResolverMetadata(context.metadata, {
|
|
@@ -84,15 +97,43 @@ export function Resolver(typeName) {
|
|
|
84
97
|
};
|
|
85
98
|
return decorator;
|
|
86
99
|
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Query.
|
|
103
|
+
*
|
|
104
|
+
* @param fieldNameOrOptions The field name or options.
|
|
105
|
+
* @returns The query result.
|
|
106
|
+
*/
|
|
87
107
|
export function Query(fieldNameOrOptions) {
|
|
88
108
|
return createMethodDecorator('query', fieldNameOrOptions);
|
|
89
109
|
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Mutation.
|
|
113
|
+
*
|
|
114
|
+
* @param fieldNameOrOptions The field name or options.
|
|
115
|
+
* @returns The mutation result.
|
|
116
|
+
*/
|
|
90
117
|
export function Mutation(fieldNameOrOptions) {
|
|
91
118
|
return createMethodDecorator('mutation', fieldNameOrOptions);
|
|
92
119
|
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Subscription.
|
|
123
|
+
*
|
|
124
|
+
* @param fieldNameOrOptions The field name or options.
|
|
125
|
+
* @returns The subscription result.
|
|
126
|
+
*/
|
|
93
127
|
export function Subscription(fieldNameOrOptions) {
|
|
94
128
|
return createMethodDecorator('subscription', fieldNameOrOptions);
|
|
95
129
|
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Arg.
|
|
133
|
+
*
|
|
134
|
+
* @param argName The arg name.
|
|
135
|
+
* @returns The arg result.
|
|
136
|
+
*/
|
|
96
137
|
export function Arg(argName) {
|
|
97
138
|
const decorator = (_value, context) => {
|
|
98
139
|
if (context.private) {
|
package/dist/discovery.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { CompiledModule } from '@fluojs/runtime';
|
|
2
2
|
import type { GraphqlModuleOptions, ResolverDescriptor } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Discover resolver descriptors.
|
|
5
|
+
*
|
|
6
|
+
* @param compiledModules The compiled modules.
|
|
7
|
+
* @param options The options.
|
|
8
|
+
* @returns The discover resolver descriptors result.
|
|
9
|
+
*/
|
|
3
10
|
export declare function discoverResolverDescriptors(compiledModules: readonly CompiledModule[], options: GraphqlModuleOptions): ResolverDescriptor[];
|
|
4
11
|
//# sourceMappingURL=discovery.d.ts.map
|
package/dist/discovery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAkI3E,wBAAgB,2BAA2B,CACzC,eAAe,EAAE,SAAS,cAAc,EAAE,EAC1C,OAAO,EAAE,oBAAoB,GAC5B,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAkI3E;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,eAAe,EAAE,SAAS,cAAc,EAAE,EAC1C,OAAO,EAAE,oBAAoB,GAC5B,kBAAkB,EAAE,CA8CtB"}
|
package/dist/discovery.js
CHANGED
|
@@ -99,6 +99,14 @@ function discoveryCandidates(compiledModules) {
|
|
|
99
99
|
}
|
|
100
100
|
return candidates;
|
|
101
101
|
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Discover resolver descriptors.
|
|
105
|
+
*
|
|
106
|
+
* @param compiledModules The compiled modules.
|
|
107
|
+
* @param options The options.
|
|
108
|
+
* @returns The discover resolver descriptors result.
|
|
109
|
+
*/
|
|
102
110
|
export function discoverResolverDescriptors(compiledModules, options) {
|
|
103
111
|
const allowedResolvers = normalizeAllowedResolverSet(options.resolvers);
|
|
104
112
|
const seenTargets = new Set();
|
|
@@ -127,7 +135,6 @@ export function discoverResolverDescriptors(compiledModules, options) {
|
|
|
127
135
|
methodKey: entry.propertyKey,
|
|
128
136
|
methodName: methodKeyToName(entry.propertyKey),
|
|
129
137
|
outputType: entry.metadata.outputType,
|
|
130
|
-
topics: entry.metadata.topics,
|
|
131
138
|
type: entry.metadata.type
|
|
132
139
|
};
|
|
133
140
|
}),
|
package/dist/metadata.d.ts
CHANGED
|
@@ -1,20 +1,81 @@
|
|
|
1
1
|
import type { MetadataPropertyKey } from '@fluojs/core';
|
|
2
2
|
import type { ArgFieldMetadata, ResolverHandlerMetadata, ResolverMetadata } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Define resolver metadata.
|
|
5
|
+
*
|
|
6
|
+
* @param target The target.
|
|
7
|
+
* @param metadata The metadata.
|
|
8
|
+
*/
|
|
3
9
|
export declare function defineResolverMetadata(target: object, metadata: ResolverMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* Get resolver metadata.
|
|
12
|
+
*
|
|
13
|
+
* @param target The target.
|
|
14
|
+
* @returns The get resolver metadata result.
|
|
15
|
+
*/
|
|
4
16
|
export declare function getResolverMetadata(target: object): ResolverMetadata | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Define resolver handler metadata.
|
|
19
|
+
*
|
|
20
|
+
* @param target The target.
|
|
21
|
+
* @param propertyKey The property key.
|
|
22
|
+
* @param metadata The metadata.
|
|
23
|
+
*/
|
|
5
24
|
export declare function defineResolverHandlerMetadata(target: object, propertyKey: MetadataPropertyKey, metadata: ResolverHandlerMetadata): void;
|
|
25
|
+
/**
|
|
26
|
+
* Get resolver handler metadata.
|
|
27
|
+
*
|
|
28
|
+
* @param target The target.
|
|
29
|
+
* @param propertyKey The property key.
|
|
30
|
+
* @returns The get resolver handler metadata result.
|
|
31
|
+
*/
|
|
6
32
|
export declare function getResolverHandlerMetadata(target: object, propertyKey: MetadataPropertyKey): ResolverHandlerMetadata | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Get resolver handler metadata entries.
|
|
35
|
+
*
|
|
36
|
+
* @param target The target.
|
|
37
|
+
* @returns The get resolver handler metadata entries result.
|
|
38
|
+
*/
|
|
7
39
|
export declare function getResolverHandlerMetadataEntries(target: object): Array<{
|
|
8
40
|
metadata: ResolverHandlerMetadata;
|
|
9
41
|
propertyKey: MetadataPropertyKey;
|
|
10
42
|
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Define arg field metadata.
|
|
45
|
+
*
|
|
46
|
+
* @param target The target.
|
|
47
|
+
* @param propertyKey The property key.
|
|
48
|
+
* @param metadata The metadata.
|
|
49
|
+
*/
|
|
11
50
|
export declare function defineArgFieldMetadata(target: object, propertyKey: MetadataPropertyKey, metadata: ArgFieldMetadata): void;
|
|
51
|
+
/**
|
|
52
|
+
* Get arg field metadata.
|
|
53
|
+
*
|
|
54
|
+
* @param target The target.
|
|
55
|
+
* @param propertyKey The property key.
|
|
56
|
+
* @returns The get arg field metadata result.
|
|
57
|
+
*/
|
|
12
58
|
export declare function getArgFieldMetadata(target: object, propertyKey: MetadataPropertyKey): ArgFieldMetadata | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Get arg field metadata entries.
|
|
61
|
+
*
|
|
62
|
+
* @param target The target.
|
|
63
|
+
* @returns The get arg field metadata entries result.
|
|
64
|
+
*/
|
|
13
65
|
export declare function getArgFieldMetadataEntries(target: object): Array<{
|
|
14
66
|
metadata: ArgFieldMetadata;
|
|
15
67
|
propertyKey: MetadataPropertyKey;
|
|
16
68
|
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Provides the resolver metadata symbol value.
|
|
71
|
+
*/
|
|
17
72
|
export declare const resolverMetadataSymbol: symbol;
|
|
73
|
+
/**
|
|
74
|
+
* Provides the handler metadata symbol value.
|
|
75
|
+
*/
|
|
18
76
|
export declare const handlerMetadataSymbol: symbol;
|
|
77
|
+
/**
|
|
78
|
+
* Provides the arg metadata symbol value.
|
|
79
|
+
*/
|
|
19
80
|
export declare const argMetadataSymbol: symbol;
|
|
20
81
|
//# sourceMappingURL=metadata.d.ts.map
|
package/dist/metadata.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA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C;AAChE;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAA8B,CAAC"}
|
package/dist/metadata.js
CHANGED
|
@@ -17,7 +17,6 @@ function cloneHandlerMetadata(metadata) {
|
|
|
17
17
|
fieldName: metadata.fieldName,
|
|
18
18
|
inputClass: metadata.inputClass,
|
|
19
19
|
outputType: metadata.outputType,
|
|
20
|
-
topics: metadata.topics,
|
|
21
20
|
type: metadata.type
|
|
22
21
|
};
|
|
23
22
|
}
|
|
@@ -65,9 +64,23 @@ function getMergedMetadataEntries(target, stored, standard, resolve) {
|
|
|
65
64
|
propertyKey
|
|
66
65
|
})).filter(entry => entry.metadata !== undefined);
|
|
67
66
|
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Define resolver metadata.
|
|
70
|
+
*
|
|
71
|
+
* @param target The target.
|
|
72
|
+
* @param metadata The metadata.
|
|
73
|
+
*/
|
|
68
74
|
export function defineResolverMetadata(target, metadata) {
|
|
69
75
|
resolverMetadataStore.set(target, cloneResolverMetadata(metadata));
|
|
70
76
|
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Get resolver metadata.
|
|
80
|
+
*
|
|
81
|
+
* @param target The target.
|
|
82
|
+
* @returns The get resolver metadata result.
|
|
83
|
+
*/
|
|
71
84
|
export function getResolverMetadata(target) {
|
|
72
85
|
const stored = resolverMetadataStore.get(target);
|
|
73
86
|
const standard = getStandardResolverMetadata(target);
|
|
@@ -76,9 +89,25 @@ export function getResolverMetadata(target) {
|
|
|
76
89
|
}
|
|
77
90
|
return cloneResolverMetadata(stored ?? standard);
|
|
78
91
|
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Define resolver handler metadata.
|
|
95
|
+
*
|
|
96
|
+
* @param target The target.
|
|
97
|
+
* @param propertyKey The property key.
|
|
98
|
+
* @param metadata The metadata.
|
|
99
|
+
*/
|
|
79
100
|
export function defineResolverHandlerMetadata(target, propertyKey, metadata) {
|
|
80
101
|
getOrCreateHandlerMetadataMap(target).set(propertyKey, cloneHandlerMetadata(metadata));
|
|
81
102
|
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Get resolver handler metadata.
|
|
106
|
+
*
|
|
107
|
+
* @param target The target.
|
|
108
|
+
* @param propertyKey The property key.
|
|
109
|
+
* @returns The get resolver handler metadata result.
|
|
110
|
+
*/
|
|
82
111
|
export function getResolverHandlerMetadata(target, propertyKey) {
|
|
83
112
|
const stored = handlerMetadataStore.get(target)?.get(propertyKey);
|
|
84
113
|
const standard = getStandardHandlerMap(target)?.get(propertyKey);
|
|
@@ -87,12 +116,35 @@ export function getResolverHandlerMetadata(target, propertyKey) {
|
|
|
87
116
|
}
|
|
88
117
|
return cloneHandlerMetadata(stored ?? standard);
|
|
89
118
|
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Get resolver handler metadata entries.
|
|
122
|
+
*
|
|
123
|
+
* @param target The target.
|
|
124
|
+
* @returns The get resolver handler metadata entries result.
|
|
125
|
+
*/
|
|
90
126
|
export function getResolverHandlerMetadataEntries(target) {
|
|
91
127
|
return getMergedMetadataEntries(target, handlerMetadataStore.get(target), getStandardHandlerMap(target), getResolverHandlerMetadata);
|
|
92
128
|
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Define arg field metadata.
|
|
132
|
+
*
|
|
133
|
+
* @param target The target.
|
|
134
|
+
* @param propertyKey The property key.
|
|
135
|
+
* @param metadata The metadata.
|
|
136
|
+
*/
|
|
93
137
|
export function defineArgFieldMetadata(target, propertyKey, metadata) {
|
|
94
138
|
getOrCreateArgFieldMetadataMap(target).set(propertyKey, cloneArgFieldMetadata(metadata));
|
|
95
139
|
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Get arg field metadata.
|
|
143
|
+
*
|
|
144
|
+
* @param target The target.
|
|
145
|
+
* @param propertyKey The property key.
|
|
146
|
+
* @returns The get arg field metadata result.
|
|
147
|
+
*/
|
|
96
148
|
export function getArgFieldMetadata(target, propertyKey) {
|
|
97
149
|
const stored = argFieldMetadataStore.get(target)?.get(propertyKey);
|
|
98
150
|
const standard = getStandardArgFieldMap(target)?.get(propertyKey);
|
|
@@ -101,9 +153,26 @@ export function getArgFieldMetadata(target, propertyKey) {
|
|
|
101
153
|
}
|
|
102
154
|
return cloneArgFieldMetadata(stored ?? standard);
|
|
103
155
|
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Get arg field metadata entries.
|
|
159
|
+
*
|
|
160
|
+
* @param target The target.
|
|
161
|
+
* @returns The get arg field metadata entries result.
|
|
162
|
+
*/
|
|
104
163
|
export function getArgFieldMetadataEntries(target) {
|
|
105
164
|
return getMergedMetadataEntries(target, argFieldMetadataStore.get(target), getStandardArgFieldMap(target), getArgFieldMetadata);
|
|
106
165
|
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Provides the resolver metadata symbol value.
|
|
169
|
+
*/
|
|
107
170
|
export const resolverMetadataSymbol = standardResolverMetadataKey;
|
|
171
|
+
/**
|
|
172
|
+
* Provides the handler metadata symbol value.
|
|
173
|
+
*/
|
|
108
174
|
export const handlerMetadataSymbol = standardHandlerMetadataKey;
|
|
175
|
+
/**
|
|
176
|
+
* Provides the arg metadata symbol value.
|
|
177
|
+
*/
|
|
109
178
|
export const argMetadataSymbol = standardArgFieldMetadataKey;
|
package/dist/module.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ import type { GraphqlModuleOptions } from './types.js';
|
|
|
9
9
|
* does not register `GraphqlEndpointController` or mount the `/graphql` endpoint by itself.
|
|
10
10
|
*/
|
|
11
11
|
export declare function createGraphqlProviders(options: GraphqlModuleOptions): Provider[];
|
|
12
|
+
/**
|
|
13
|
+
* Represents the graphql module.
|
|
14
|
+
*/
|
|
12
15
|
export declare class GraphqlModule {
|
|
13
16
|
/**
|
|
14
17
|
* Registers the GraphQL endpoint controller together with lifecycle providers.
|
package/dist/module.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIhE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,oBAAoB,GAAG,QAAQ,EAAE,CAQhF;AAED,qBAAa,aAAa;IACxB;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,CAAC,OAAO,GAAE,oBAAyB,GAAG,UAAU;CAS/D"}
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIhE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,oBAAoB,GAAG,QAAQ,EAAE,CAQhF;AAED;;GAEG;AACH,qBAAa,aAAa;IACxB;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,CAAC,OAAO,GAAE,oBAAyB,GAAG,UAAU;CAS/D"}
|
package/dist/module.js
CHANGED
|
@@ -14,6 +14,10 @@ export function createGraphqlProviders(options) {
|
|
|
14
14
|
useValue: options
|
|
15
15
|
}, GraphqlLifecycleService];
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Represents the graphql module.
|
|
20
|
+
*/
|
|
17
21
|
export class GraphqlModule {
|
|
18
22
|
/**
|
|
19
23
|
* Registers the GraphQL endpoint controller together with lifecycle providers.
|
package/dist/schema/schema.d.ts
CHANGED
|
@@ -14,7 +14,25 @@ type YogaGraphqlDeps = {
|
|
|
14
14
|
GraphQLUnionType: typeof GraphQLUnionTypeType;
|
|
15
15
|
buildSchema: (source: string) => GraphQLSchemaType;
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Resolve schema.
|
|
19
|
+
*
|
|
20
|
+
* @param deps The deps.
|
|
21
|
+
* @param optionsSchema The options schema.
|
|
22
|
+
* @param createCodeFirstSchema The create code first schema.
|
|
23
|
+
* @param markAllowedCrossRealmGraphqlObjects The mark allowed cross realm graphql objects.
|
|
24
|
+
* @returns The resolve schema result.
|
|
25
|
+
*/
|
|
17
26
|
export declare function resolveSchema(deps: YogaGraphqlDeps, optionsSchema: GraphQLSchemaType | string | undefined, createCodeFirstSchema: () => GraphQLSchemaType, markAllowedCrossRealmGraphqlObjects: (value: unknown) => void): GraphQLSchemaType;
|
|
27
|
+
/**
|
|
28
|
+
* Create code first schema.
|
|
29
|
+
*
|
|
30
|
+
* @param deps The deps.
|
|
31
|
+
* @param runtimeContainer The runtime container.
|
|
32
|
+
* @param resolverDescriptors The resolver descriptors.
|
|
33
|
+
* @param markAllowedCrossRealmGraphqlObjects The mark allowed cross realm graphql objects.
|
|
34
|
+
* @returns The create code first schema result.
|
|
35
|
+
*/
|
|
18
36
|
export declare function createCodeFirstSchema(deps: YogaGraphqlDeps, runtimeContainer: Container, resolverDescriptors: ResolverDescriptor[], markAllowedCrossRealmGraphqlObjects?: (value: unknown) => void): GraphQLSchemaType;
|
|
19
37
|
export {};
|
|
20
38
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/schema/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,KAAK,EAGV,YAAY,IAAI,gBAAgB,EAGhC,WAAW,IAAI,eAAe,EAC9B,iBAAiB,IAAI,qBAAqB,EAE1C,aAAa,IAAI,iBAAi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,aAAa,IAAI,iBAAiB,EAClC,iBAAiB,EACjB,gBAAgB,IAAI,oBAAoB,EACzC,MAAM,SAAS,CAAC;AAIjB,OAAO,EAOL,KAAK,kBAAkB,EAGxB,MAAM,aAAa,CAAC;AAErB,KAAK,eAAe,GAAG;IACrB,YAAY,EAAE,OAAO,gBAAgB,CAAC;IACtC,cAAc,EAAE,iBAAiB,CAAC;IAClC,YAAY,EAAE,iBAAiB,CAAC;IAChC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,WAAW,EAAE,OAAO,eAAe,CAAC;IACpC,iBAAiB,EAAE,OAAO,qBAAqB,CAAC;IAChD,aAAa,EAAE,OAAO,iBAAiB,CAAC;IACxC,aAAa,EAAE,iBAAiB,CAAC;IACjC,gBAAgB,EAAE,OAAO,oBAAoB,CAAC;IAC9C,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,iBAAiB,CAAC;CACpD,CAAC;AAiaF;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,eAAe,EACrB,aAAa,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,EACrD,qBAAqB,EAAE,MAAM,iBAAiB,EAC9C,mCAAmC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAC5D,iBAAiB,CAWnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,eAAe,EACrB,gBAAgB,EAAE,SAAS,EAC3B,mBAAmB,EAAE,kBAAkB,EAAE,EACzC,mCAAmC,GAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAe,GACvE,iBAAiB,CA0CnB"}
|
package/dist/schema/schema.js
CHANGED
|
@@ -248,6 +248,16 @@ function createOptionalRootType(deps, name, fields) {
|
|
|
248
248
|
name
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Resolve schema.
|
|
254
|
+
*
|
|
255
|
+
* @param deps The deps.
|
|
256
|
+
* @param optionsSchema The options schema.
|
|
257
|
+
* @param createCodeFirstSchema The create code first schema.
|
|
258
|
+
* @param markAllowedCrossRealmGraphqlObjects The mark allowed cross realm graphql objects.
|
|
259
|
+
* @returns The resolve schema result.
|
|
260
|
+
*/
|
|
251
261
|
export function resolveSchema(deps, optionsSchema, createCodeFirstSchema, markAllowedCrossRealmGraphqlObjects) {
|
|
252
262
|
if (isGraphQLSchemaLike(optionsSchema)) {
|
|
253
263
|
markAllowedCrossRealmGraphqlObjects(optionsSchema);
|
|
@@ -258,6 +268,16 @@ export function resolveSchema(deps, optionsSchema, createCodeFirstSchema, markAl
|
|
|
258
268
|
}
|
|
259
269
|
return createCodeFirstSchema();
|
|
260
270
|
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Create code first schema.
|
|
274
|
+
*
|
|
275
|
+
* @param deps The deps.
|
|
276
|
+
* @param runtimeContainer The runtime container.
|
|
277
|
+
* @param resolverDescriptors The resolver descriptors.
|
|
278
|
+
* @param markAllowedCrossRealmGraphqlObjects The mark allowed cross realm graphql objects.
|
|
279
|
+
* @returns The create code first schema result.
|
|
280
|
+
*/
|
|
261
281
|
export function createCodeFirstSchema(deps, runtimeContainer, resolverDescriptors, markAllowedCrossRealmGraphqlObjects = () => {}) {
|
|
262
282
|
if (resolverDescriptors.length === 0) {
|
|
263
283
|
throw new Error('GraphQL module requires either schema or at least one resolver decorated with @Resolver().');
|
package/dist/service.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare class GraphqlLifecycleService implements OnApplicationBootstrap,
|
|
|
27
27
|
private websocketUpgradeListener;
|
|
28
28
|
private websocketUpgradeServer;
|
|
29
29
|
private executeGraphqlOperation;
|
|
30
|
+
private releaseGraphqlInstanceOfPatch;
|
|
30
31
|
private subscribeGraphqlOperation;
|
|
31
32
|
private yoga;
|
|
32
33
|
private readonly middleware;
|
package/dist/service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgD,KAAK,sBAAsB,EAAsD,MAAM,cAAc,CAAC;AAE7J,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC3B,MAAM,iBAAiB,CAAC;AA2BzB,OAAO,KAAK,EAEV,oBAAoB,EAGrB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgD,KAAK,sBAAsB,EAAsD,MAAM,cAAc,CAAC;AAE7J,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC3B,MAAM,iBAAiB,CAAC;AA2BzB,OAAO,KAAK,EAEV,oBAAoB,EAGrB,MAAM,YAAY,CAAC;AAmIpB;;GAEG;AACH,qBACa,yBAAyB;IAEpC,SAAS,IAAI,SAAS;IAKtB,UAAU,IAAI,SAAS;CAGxB;AA+ID;;GAEG;AACH,qBACa,uBAAwB,YAAW,sBAAsB,EAAE,qBAAqB;IA6DzF,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAhExB,OAAO,CAAC,uBAAuB,CAAsC;IACrE,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAqC;IACzE,OAAO,CAAC,QAAQ,CAAC,4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
80
|
const runtimeRequire = createRequire(import.meta.url);
|
|
81
|
-
let
|
|
81
|
+
let graphqlInstanceOfPatchRefCount = 0;
|
|
82
|
+
let restoreGraphqlInstanceOfPatch;
|
|
82
83
|
const allowedCrossRealmGraphqlObjects = new WeakSet();
|
|
83
84
|
|
|
84
85
|
/**
|
|
@@ -149,15 +150,16 @@ function isAllowedCrossRealmGraphqlObject(value, constructor) {
|
|
|
149
150
|
}
|
|
150
151
|
return allowedCrossRealmGraphqlObjects.has(value) && getCrossRealmGraphqlTag(value, constructor) !== undefined;
|
|
151
152
|
}
|
|
152
|
-
function
|
|
153
|
-
if (graphqlInstanceOfPatched) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
153
|
+
function installGraphqlInstanceOfPatch() {
|
|
156
154
|
const instanceOfModule = runtimeRequire('graphql/jsutils/instanceOf.js');
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
if (restoreGraphqlInstanceOfPatch) {
|
|
156
|
+
graphqlInstanceOfPatchRefCount += 1;
|
|
157
|
+
return releaseGraphqlInstanceOfPatch;
|
|
158
|
+
}
|
|
159
|
+
const patchedFrom = instanceOfModule.instanceOf;
|
|
160
|
+
const patchedInstanceOf = (value, constructor) => {
|
|
159
161
|
try {
|
|
160
|
-
if (
|
|
162
|
+
if (patchedFrom(value, constructor)) {
|
|
161
163
|
return true;
|
|
162
164
|
}
|
|
163
165
|
} catch (error) {
|
|
@@ -168,7 +170,26 @@ function patchGraphqlInstanceOf() {
|
|
|
168
170
|
}
|
|
169
171
|
return isAllowedCrossRealmGraphqlObject(value, constructor);
|
|
170
172
|
};
|
|
171
|
-
|
|
173
|
+
instanceOfModule.instanceOf = patchedInstanceOf;
|
|
174
|
+
graphqlInstanceOfPatchRefCount = 1;
|
|
175
|
+
restoreGraphqlInstanceOfPatch = () => {
|
|
176
|
+
if (instanceOfModule.instanceOf !== patchedInstanceOf) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
instanceOfModule.instanceOf = patchedFrom;
|
|
180
|
+
};
|
|
181
|
+
return releaseGraphqlInstanceOfPatch;
|
|
182
|
+
}
|
|
183
|
+
function releaseGraphqlInstanceOfPatch() {
|
|
184
|
+
if (graphqlInstanceOfPatchRefCount === 0) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
graphqlInstanceOfPatchRefCount -= 1;
|
|
188
|
+
if (graphqlInstanceOfPatchRefCount > 0) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
restoreGraphqlInstanceOfPatch?.();
|
|
192
|
+
restoreGraphqlInstanceOfPatch = undefined;
|
|
172
193
|
}
|
|
173
194
|
async function loadGraphqlDeps() {
|
|
174
195
|
const graphqlMod = runtimeRequire('graphql');
|
|
@@ -208,6 +229,7 @@ class GraphqlLifecycleService {
|
|
|
208
229
|
websocketUpgradeListener;
|
|
209
230
|
websocketUpgradeServer;
|
|
210
231
|
executeGraphqlOperation;
|
|
232
|
+
releaseGraphqlInstanceOfPatch;
|
|
211
233
|
subscribeGraphqlOperation;
|
|
212
234
|
yoga;
|
|
213
235
|
middleware = {
|
|
@@ -291,6 +313,8 @@ class GraphqlLifecycleService {
|
|
|
291
313
|
this.middlewareRegistered = false;
|
|
292
314
|
this.executeGraphqlOperation = undefined;
|
|
293
315
|
this.graphQLErrorConstructor = undefined;
|
|
316
|
+
this.releaseGraphqlInstanceOfPatch?.();
|
|
317
|
+
this.releaseGraphqlInstanceOfPatch = undefined;
|
|
294
318
|
this.subscribeGraphqlOperation = undefined;
|
|
295
319
|
this.yoga = undefined;
|
|
296
320
|
}
|
|
@@ -312,7 +336,7 @@ class GraphqlLifecycleService {
|
|
|
312
336
|
};
|
|
313
337
|
}
|
|
314
338
|
resolveSchema(deps) {
|
|
315
|
-
|
|
339
|
+
this.releaseGraphqlInstanceOfPatch ??= installGraphqlInstanceOfPatch();
|
|
316
340
|
return resolveSchema(deps, this.options.schema, () => this.createCodeFirstSchema(deps), markAllowedCrossRealmGraphqlObjects);
|
|
317
341
|
}
|
|
318
342
|
createCodeFirstSchema(deps) {
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import type { FrameworkRequest, FrameworkResponse } from '@fluojs/http';
|
|
2
|
+
/**
|
|
3
|
+
* Is graphql path.
|
|
4
|
+
*
|
|
5
|
+
* @param path The path.
|
|
6
|
+
* @returns The is graphql path result.
|
|
7
|
+
*/
|
|
2
8
|
export declare function isGraphqlPath(path: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* To fetch request.
|
|
11
|
+
*
|
|
12
|
+
* @param request The request.
|
|
13
|
+
* @returns The to fetch request result.
|
|
14
|
+
*/
|
|
3
15
|
export declare function toFetchRequest(request: FrameworkRequest): Request;
|
|
16
|
+
/**
|
|
17
|
+
* Write fetch response.
|
|
18
|
+
*
|
|
19
|
+
* @param fetchResponse The fetch response.
|
|
20
|
+
* @param frameworkResponse The framework response.
|
|
21
|
+
* @returns The write fetch response result.
|
|
22
|
+
*/
|
|
4
23
|
export declare function writeFetchResponse(fetchResponse: Response, frameworkResponse: FrameworkResponse): Promise<void>;
|
|
5
24
|
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAA2B,MAAM,cAAc,CAAC;AAEjG,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAsED,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAUjE;
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAA2B,MAAM,cAAc,CAAC;AAEjG;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAsED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAUjE;AAgGD;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,aAAa,EAAE,QAAQ,EAAE,iBAAiB,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BrH"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Is graphql path.
|
|
3
|
+
*
|
|
4
|
+
* @param path The path.
|
|
5
|
+
* @returns The is graphql path result.
|
|
6
|
+
*/
|
|
1
7
|
export function isGraphqlPath(path) {
|
|
2
8
|
return path === '/graphql' || path === '/graphql/';
|
|
3
9
|
}
|
|
@@ -53,6 +59,13 @@ function createFetchBody(request, headers) {
|
|
|
53
59
|
}
|
|
54
60
|
return JSON.stringify(request.body);
|
|
55
61
|
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* To fetch request.
|
|
65
|
+
*
|
|
66
|
+
* @param request The request.
|
|
67
|
+
* @returns The to fetch request result.
|
|
68
|
+
*/
|
|
56
69
|
export function toFetchRequest(request) {
|
|
57
70
|
const headers = createFetchHeaders(request);
|
|
58
71
|
const body = createFetchBody(request, headers);
|
|
@@ -76,32 +89,54 @@ function readSetCookieValues(headers) {
|
|
|
76
89
|
}
|
|
77
90
|
return values;
|
|
78
91
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
92
|
+
async function writeFetchResponseStream(body, stream) {
|
|
93
|
+
const reader = body.getReader();
|
|
94
|
+
let readerDone = false;
|
|
95
|
+
let cancelPromise;
|
|
96
|
+
let notifyCancellation;
|
|
97
|
+
const cancellationStarted = new Promise(resolve => {
|
|
98
|
+
notifyCancellation = resolve;
|
|
99
|
+
});
|
|
100
|
+
const removeCloseListener = stream.onClose?.(() => {
|
|
101
|
+
if (!readerDone) {
|
|
102
|
+
void cancelUnreadBody().catch(() => {});
|
|
88
103
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
104
|
+
});
|
|
105
|
+
const cancelUnreadBody = () => {
|
|
106
|
+
if (!cancelPromise) {
|
|
107
|
+
readerDone = true;
|
|
108
|
+
notifyCancellation?.();
|
|
109
|
+
cancelPromise = reader.cancel();
|
|
110
|
+
}
|
|
111
|
+
return cancelPromise;
|
|
112
|
+
};
|
|
113
|
+
const readNextChunk = async () => {
|
|
114
|
+
const readPromise = reader.read();
|
|
115
|
+
readPromise.catch(() => {});
|
|
116
|
+
return await Promise.race([readPromise, cancellationStarted.then(async () => {
|
|
117
|
+
await cancelPromise;
|
|
118
|
+
return {
|
|
119
|
+
done: true,
|
|
120
|
+
value: undefined
|
|
121
|
+
};
|
|
122
|
+
})]);
|
|
123
|
+
};
|
|
124
|
+
try {
|
|
96
125
|
while (true) {
|
|
126
|
+
if (stream.closed) {
|
|
127
|
+
await cancelUnreadBody();
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
97
130
|
const {
|
|
98
131
|
done,
|
|
99
132
|
value
|
|
100
|
-
} = await
|
|
133
|
+
} = await readNextChunk();
|
|
101
134
|
if (done) {
|
|
135
|
+
readerDone = true;
|
|
102
136
|
break;
|
|
103
137
|
}
|
|
104
138
|
if (stream.closed) {
|
|
139
|
+
await cancelUnreadBody();
|
|
105
140
|
break;
|
|
106
141
|
}
|
|
107
142
|
const canContinue = stream.write(value);
|
|
@@ -109,9 +144,41 @@ export async function writeFetchResponse(fetchResponse, frameworkResponse) {
|
|
|
109
144
|
await stream.waitForDrain?.();
|
|
110
145
|
}
|
|
111
146
|
}
|
|
112
|
-
|
|
113
|
-
|
|
147
|
+
} catch (error) {
|
|
148
|
+
await cancelUnreadBody();
|
|
149
|
+
throw error;
|
|
150
|
+
} finally {
|
|
151
|
+
removeCloseListener?.();
|
|
152
|
+
}
|
|
153
|
+
if (!stream.closed) {
|
|
154
|
+
stream.close();
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Write fetch response.
|
|
160
|
+
*
|
|
161
|
+
* @param fetchResponse The fetch response.
|
|
162
|
+
* @param frameworkResponse The framework response.
|
|
163
|
+
* @returns The write fetch response result.
|
|
164
|
+
*/
|
|
165
|
+
export async function writeFetchResponse(fetchResponse, frameworkResponse) {
|
|
166
|
+
frameworkResponse.setStatus(fetchResponse.status);
|
|
167
|
+
const setCookieValues = readSetCookieValues(fetchResponse.headers);
|
|
168
|
+
for (const value of setCookieValues) {
|
|
169
|
+
frameworkResponse.setHeader('set-cookie', value);
|
|
170
|
+
}
|
|
171
|
+
for (const [name, value] of fetchResponse.headers.entries()) {
|
|
172
|
+
if (name.toLowerCase() === 'set-cookie') {
|
|
173
|
+
continue;
|
|
114
174
|
}
|
|
175
|
+
frameworkResponse.setHeader(name, value);
|
|
176
|
+
}
|
|
177
|
+
const stream = frameworkResponse.stream;
|
|
178
|
+
if (fetchResponse.body && stream) {
|
|
179
|
+
frameworkResponse.committed = true;
|
|
180
|
+
stream.flush?.();
|
|
181
|
+
await writeFetchResponseStream(fetchResponse.body, stream);
|
|
115
182
|
return;
|
|
116
183
|
}
|
|
117
184
|
const buffer = await fetchResponse.arrayBuffer();
|
package/dist/types.d.ts
CHANGED
|
@@ -154,7 +154,6 @@ export type GraphqlRootOutputType = GraphqlRootOutputNamedType | GraphqlListType
|
|
|
154
154
|
export interface ResolverHandlerMetadata {
|
|
155
155
|
type: ResolverHandlerType;
|
|
156
156
|
fieldName?: string;
|
|
157
|
-
topics?: string | string[];
|
|
158
157
|
inputClass?: Function;
|
|
159
158
|
argTypes?: Record<string, GraphqlArgType>;
|
|
160
159
|
outputType?: GraphqlRootOutputType;
|
|
@@ -174,7 +173,6 @@ export interface ResolverHandlerDescriptor {
|
|
|
174
173
|
methodKey: MetadataPropertyKey;
|
|
175
174
|
methodName: string;
|
|
176
175
|
fieldName: string;
|
|
177
|
-
topics?: string | string[];
|
|
178
176
|
inputClass?: Function;
|
|
179
177
|
argFields: ArgFieldMetadata[];
|
|
180
178
|
argTypes?: Record<string, GraphqlArgType>;
|
|
@@ -192,14 +190,17 @@ export interface ResolverDescriptor {
|
|
|
192
190
|
scope: 'singleton' | 'request' | 'transient';
|
|
193
191
|
}
|
|
194
192
|
/**
|
|
195
|
-
* Public options for `GraphqlModule.forRoot(...)
|
|
193
|
+
* Public options for `GraphqlModule.forRoot(...)`.
|
|
196
194
|
*
|
|
197
195
|
* @remarks
|
|
198
196
|
* Keep README examples for end-to-end module wiring. Source hover docs here are
|
|
199
197
|
* meant to clarify how each option shapes the per-request execution pipeline.
|
|
200
198
|
*/
|
|
201
199
|
export interface GraphqlModuleOptions {
|
|
202
|
-
|
|
200
|
+
/**
|
|
201
|
+
* Provide a prebuilt executable `GraphQLSchema` when you want to own schema assembly yourself.
|
|
202
|
+
*/
|
|
203
|
+
schema?: GraphQLSchema;
|
|
203
204
|
resolvers?: Function[];
|
|
204
205
|
context?: (ctx: GraphqlRequestContext) => Record<string, unknown>;
|
|
205
206
|
graphiql?: boolean;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAElF;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,eAAiD,CAAC;AAE1F;;;;;GAKG;AACH,eAAO,MAAM,mC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ClE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,MAAM,CAAC,EAAE,2BAA2B,GAAG,KAAK,CAAC;IAC7C,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,aAAa,CAAC,EAAE,2BAA2B,CAAC;CAC7C"}
|
package/dist/types.js
CHANGED
|
@@ -124,7 +124,7 @@ export function isGraphqlListTypeRef(value) {
|
|
|
124
124
|
*/
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
|
-
* Public options for `GraphqlModule.forRoot(...)
|
|
127
|
+
* Public options for `GraphqlModule.forRoot(...)`.
|
|
128
128
|
*
|
|
129
129
|
* @remarks
|
|
130
130
|
* Keep README examples for end-to-end module wiring. Source hover docs here are
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"yoga",
|
|
10
10
|
"api"
|
|
11
11
|
],
|
|
12
|
-
"version": "1.0.0-beta.
|
|
12
|
+
"version": "1.0.0-beta.5",
|
|
13
13
|
"private": false,
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"repository": {
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"graphql-ws": "^5.16.2",
|
|
42
42
|
"graphql-yoga": "^5.18.1",
|
|
43
43
|
"ws": "^8.18.3",
|
|
44
|
-
"@fluojs/core": "^1.0.0-beta.
|
|
45
|
-
"@fluojs/di": "^1.0.0-beta.
|
|
46
|
-
"@fluojs/http": "^1.0.0-beta.
|
|
47
|
-
"@fluojs/runtime": "^1.0.0-beta.
|
|
48
|
-
"@fluojs/validation": "^1.0.0-beta.
|
|
44
|
+
"@fluojs/core": "^1.0.0-beta.3",
|
|
45
|
+
"@fluojs/di": "^1.0.0-beta.6",
|
|
46
|
+
"@fluojs/http": "^1.0.0-beta.9",
|
|
47
|
+
"@fluojs/runtime": "^1.0.0-beta.9",
|
|
48
|
+
"@fluojs/validation": "^1.0.0-beta.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/ws": "^8.18.1",
|