@fluojs/graphql 1.0.0 → 1.0.1

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 CHANGED
@@ -107,6 +107,7 @@ class UserResolver {
107
107
  - Singleton resolver가 기본값이며, 각 operation에서 애플리케이션 컨테이너를 통해 resolve됩니다.
108
108
  - Request-scoped provider를 주입하는 resolver는 resolver 자체에도 `@Scope('request')`를 지정해야 합니다. 이렇게 해야 DI lifetime 규칙이 명시적으로 유지되고 singleton-to-request dependency mismatch를 피할 수 있습니다.
109
109
  - `@fluojs/graphql`은 HTTP GraphQL 요청 또는 WebSocket subscription operation마다 operation-scoped DI 컨테이너를 하나 만들고, 해당 operation 안의 resolver 호출들이 이를 공유하며, operation 완료 또는 WebSocket operation 종료 시 dispose합니다.
110
+ - Resolver 메서드는 `GraphQLContext`를 받으며, 내장 필드에는 fluo `request`, middleware 또는 guard가 설정한 인증된 HTTP `principal`, WebSocket subscription의 `connectionParams`와 `socket`, 그리고 `GraphqlModule.forRoot({ context })`가 반환한 사용자 정의 필드가 포함됩니다.
110
111
  - Request-scoped DataLoader helper는 같은 `GraphQLContext` operation 경계를 사용하므로 loader cache는 하나의 GraphQL operation 안에서만 공유됩니다.
111
112
 
112
113
  ```typescript
@@ -137,6 +138,8 @@ class RequestResolver {
137
138
  - **SSE**: Server-Sent Events를 통한 구독(기본값).
138
139
  - **WebSockets**: 활성 adapter가 upgrade listener를 지원하는 Node HTTP/S 서버를 노출할 때(예: Node HTTP adapter) 사용할 수 있는 선택적 `graphql-ws` 실시간 구독 지원.
139
140
 
141
+ HTTP query/mutation과 기본 SSE subscription 경로는 fluo의 portable HTTP 추상화를 통해 실행됩니다. 선택적 WebSocket transport는 의도적으로 더 좁은 범위를 가집니다. Server-backed Node HTTP/S adapter 표면이 필요하므로 Bun, Deno, Cloudflare Workers 배포에서는 adapter가 호환되는 upgrade listener를 노출하지 않는 한 기본 SSE 경로를 유지해야 합니다.
142
+
140
143
  ```typescript
141
144
  GraphqlModule.forRoot({
142
145
  subscriptions: {
package/README.md CHANGED
@@ -107,6 +107,7 @@ class UserResolver {
107
107
  - Singleton resolvers are the default and are resolved from the application container for every operation.
108
108
  - Resolvers that inject request-scoped providers must also be marked with `@Scope('request')`; this keeps DI lifetime rules explicit and avoids singleton-to-request dependency mismatches.
109
109
  - `@fluojs/graphql` creates one operation-scoped DI container for each HTTP GraphQL request or websocket subscription operation, shares it across resolver calls in that operation, and disposes it when the operation completes or the websocket operation disconnects.
110
+ - Resolver methods receive a `GraphQLContext` whose built-in fields expose the underlying fluo `request`, the authenticated HTTP `principal` when middleware or guards set one, websocket `connectionParams` and `socket` for websocket subscriptions, and any custom fields returned from `GraphqlModule.forRoot({ context })`.
110
111
  - Request-scoped DataLoader helpers use the same `GraphQLContext` operation boundary, so loader caches are shared only within one GraphQL operation.
111
112
 
112
113
  ```typescript
@@ -137,6 +138,8 @@ class RequestResolver {
137
138
  - **SSE**: Subscriptions over Server-Sent Events (default).
138
139
  - **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).
139
140
 
141
+ HTTP queries/mutations and the default SSE subscription path run through fluo's portable HTTP abstraction. The optional websocket transport is intentionally narrower: it requires a server-backed Node HTTP/S adapter surface, so Bun, Deno, and Cloudflare Workers deployments should keep the default SSE path unless their adapter exposes compatible upgrade listeners.
142
+
140
143
  ```typescript
141
144
  GraphqlModule.forRoot({
142
145
  subscriptions: {
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "yoga",
10
10
  "api"
11
11
  ],
12
- "version": "1.0.0",
12
+ "version": "1.0.1",
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",
45
- "@fluojs/di": "^1.0.0",
44
+ "@fluojs/core": "^1.0.1",
45
+ "@fluojs/di": "^1.0.1",
46
46
  "@fluojs/http": "^1.0.0",
47
- "@fluojs/runtime": "^1.0.0",
48
- "@fluojs/validation": "^1.0.0"
47
+ "@fluojs/runtime": "^1.0.1",
48
+ "@fluojs/validation": "^1.0.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/ws": "^8.18.1",