@fluojs/graphql 1.0.0-beta.5 → 1.0.0-beta.6
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 +9 -2
- package/README.md +9 -2
- package/dist/decorators.d.ts.map +1 -1
- package/dist/decorators.js +2 -2
- package/package.json +5 -5
package/README.ko.md
CHANGED
|
@@ -33,6 +33,8 @@ pnpm add @fluojs/graphql graphql graphql-yoga
|
|
|
33
33
|
|
|
34
34
|
`GraphqlModule.forRoot(...)`를 등록하고 표준 데코레이터를 사용하여 resolver를 정의합니다. 현재 `@fluojs/graphql`는 동기 모듈 엔트리포인트만 제공하며 `GraphqlModule.forRootAsync(...)` 계약은 없습니다.
|
|
35
35
|
|
|
36
|
+
Code-first resolver discovery 대신 schema-first 통합을 원하면 executable `GraphQLSchema`를 `schema`로 전달할 수도 있습니다.
|
|
37
|
+
|
|
36
38
|
```typescript
|
|
37
39
|
import { Module } from '@fluojs/core';
|
|
38
40
|
import { bootstrapNodeApplication } from '@fluojs/runtime/node';
|
|
@@ -150,6 +152,8 @@ GraphqlModule.forRoot({
|
|
|
150
152
|
})
|
|
151
153
|
```
|
|
152
154
|
|
|
155
|
+
`@Subscription({ topics })`는 지원하지 않습니다. Subscription resolver는 `AsyncIterable`을 반환해야 합니다.
|
|
156
|
+
|
|
153
157
|
## 운영 가드레일
|
|
154
158
|
|
|
155
159
|
- `graphiql`을 명시적으로 켜거나 `introspection: true`를 설정하지 않으면 스키마 introspection은 기본적으로 비활성화됩니다.
|
|
@@ -187,8 +191,11 @@ GraphqlModule.forRoot({
|
|
|
187
191
|
- `GraphqlModule.forRoot(options)`: GraphQL 통합을 위한 메인 엔트리 포인트.
|
|
188
192
|
- `Resolver`, `Query`, `Mutation`, `Subscription`: 작업 데코레이터.
|
|
189
193
|
- `Arg`: Input DTO 필드를 GraphQL 인자로 매핑하는 데코레이터.
|
|
190
|
-
- `createDataLoader`, `createDataLoaderMap`: DataLoader
|
|
191
|
-
- `
|
|
194
|
+
- `createDataLoader`, `createDataLoaderMap`, `getRequestScopedDataLoader`, `createRequestScopedDataLoaderFactory`, `DataLoader`: DataLoader factory helper와 type.
|
|
195
|
+
- `listOf`, `isGraphqlListTypeRef`: list output type reference helper.
|
|
196
|
+
- `GraphQLContext` 및 export되는 option/metadata type: GraphQL 실행과 module 설정을 위한 타입 정의.
|
|
197
|
+
|
|
198
|
+
지원되는 module option에는 `schema`, `context`, `plugins`, `graphiql`, `introspection`, `limits`, `subscriptions.websocket.enabled`, `subscriptions.websocket.limits`, `connectionInitWaitTimeoutMs`, `keepAliveMs`가 포함됩니다.
|
|
192
199
|
|
|
193
200
|
## 관련 패키지
|
|
194
201
|
|
package/README.md
CHANGED
|
@@ -33,6 +33,8 @@ pnpm add @fluojs/graphql graphql graphql-yoga
|
|
|
33
33
|
|
|
34
34
|
Register `GraphqlModule.forRoot(...)` and define a resolver using standard decorators. `@fluojs/graphql` currently exposes a synchronous module entrypoint only; there is no `GraphqlModule.forRootAsync(...)` contract.
|
|
35
35
|
|
|
36
|
+
You can also pass an executable `GraphQLSchema` via `schema` when you want schema-first integration instead of code-first resolver discovery.
|
|
37
|
+
|
|
36
38
|
```typescript
|
|
37
39
|
import { Module } from '@fluojs/core';
|
|
38
40
|
import { bootstrapNodeApplication } from '@fluojs/runtime/node';
|
|
@@ -150,6 +152,8 @@ GraphqlModule.forRoot({
|
|
|
150
152
|
})
|
|
151
153
|
```
|
|
152
154
|
|
|
155
|
+
`@Subscription({ topics })` is not supported. Subscription resolvers must return an `AsyncIterable`.
|
|
156
|
+
|
|
153
157
|
## Operational Guardrails
|
|
154
158
|
|
|
155
159
|
- Schema introspection is disabled by default unless you explicitly enable `graphiql` or set `introspection: true`.
|
|
@@ -187,8 +191,11 @@ GraphqlModule.forRoot({
|
|
|
187
191
|
- `GraphqlModule.forRoot(options)`: Main entry point for GraphQL integration.
|
|
188
192
|
- `Resolver`, `Query`, `Mutation`, `Subscription`: Operation decorators.
|
|
189
193
|
- `Arg`: Input DTO field-to-GraphQL-argument mapping decorator.
|
|
190
|
-
- `createDataLoader`, `createDataLoaderMap`: DataLoader factory helpers.
|
|
191
|
-
- `
|
|
194
|
+
- `createDataLoader`, `createDataLoaderMap`, `getRequestScopedDataLoader`, `createRequestScopedDataLoaderFactory`, `DataLoader`: DataLoader factory helpers and types.
|
|
195
|
+
- `listOf`, `isGraphqlListTypeRef`: Helpers for list output type references.
|
|
196
|
+
- `GraphQLContext` and exported option/metadata types: Type definitions for GraphQL execution and module configuration.
|
|
197
|
+
|
|
198
|
+
Supported module options include `schema`, `context`, `plugins`, `graphiql`, `introspection`, `limits`, `subscriptions.websocket.enabled`, `subscriptions.websocket.limits`, `connectionInitWaitTimeoutMs`, and `keepAliveMs`.
|
|
192
199
|
|
|
193
200
|
## Related Packages
|
|
194
201
|
|
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,KAAK,wBAAwB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,qBAAqB,KAAK,IAAI,CAAC;AAC1F,KAAK,yBAAyB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,2BAA2B,KAAK,IAAI,CAAC;AACjG,KAAK,wBAAwB,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,0BAA0B,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC;AAE1H;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,c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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,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ensureMetadataSymbol } from '@fluojs/core/internal';
|
|
2
2
|
import { argMetadataSymbol, handlerMetadataSymbol, resolverMetadataSymbol } from './metadata.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Describes the resolver method options contract.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
ensureMetadataSymbol();
|
|
8
9
|
function getStandardMetadataBag(metadata) {
|
|
9
|
-
void metadataSymbol;
|
|
10
10
|
return metadata;
|
|
11
11
|
}
|
|
12
12
|
function normalizeResolverTypeName(typeName, fallbackName) {
|
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.6",
|
|
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.
|
|
44
|
+
"@fluojs/core": "^1.0.0-beta.4",
|
|
45
45
|
"@fluojs/di": "^1.0.0-beta.6",
|
|
46
|
-
"@fluojs/http": "^1.0.0-beta.
|
|
47
|
-
"@fluojs/runtime": "^1.0.0-beta.
|
|
48
|
-
"@fluojs/validation": "^1.0.0-beta.
|
|
46
|
+
"@fluojs/http": "^1.0.0-beta.10",
|
|
47
|
+
"@fluojs/runtime": "^1.0.0-beta.11",
|
|
48
|
+
"@fluojs/validation": "^1.0.0-beta.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/ws": "^8.18.1",
|