@effect-gql/core 0.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/LICENSE +7 -0
- package/dist/analyzer-extension.d.ts +105 -0
- package/dist/analyzer-extension.d.ts.map +1 -0
- package/dist/analyzer-extension.js +137 -0
- package/dist/analyzer-extension.js.map +1 -0
- package/dist/builder/execute.d.ts +26 -0
- package/dist/builder/execute.d.ts.map +1 -0
- package/dist/builder/execute.js +104 -0
- package/dist/builder/execute.js.map +1 -0
- package/dist/builder/field-builders.d.ts +30 -0
- package/dist/builder/field-builders.d.ts.map +1 -0
- package/dist/builder/field-builders.js +200 -0
- package/dist/builder/field-builders.js.map +1 -0
- package/dist/builder/index.d.ts +7 -0
- package/dist/builder/index.d.ts.map +1 -0
- package/dist/builder/index.js +31 -0
- package/dist/builder/index.js.map +1 -0
- package/dist/builder/pipe-api.d.ts +231 -0
- package/dist/builder/pipe-api.d.ts.map +1 -0
- package/dist/builder/pipe-api.js +151 -0
- package/dist/builder/pipe-api.js.map +1 -0
- package/dist/builder/schema-builder.d.ts +301 -0
- package/dist/builder/schema-builder.d.ts.map +1 -0
- package/dist/builder/schema-builder.js +566 -0
- package/dist/builder/schema-builder.js.map +1 -0
- package/dist/builder/type-registry.d.ts +80 -0
- package/dist/builder/type-registry.d.ts.map +1 -0
- package/dist/builder/type-registry.js +505 -0
- package/dist/builder/type-registry.js.map +1 -0
- package/dist/builder/types.d.ts +283 -0
- package/dist/builder/types.d.ts.map +1 -0
- package/dist/builder/types.js +3 -0
- package/dist/builder/types.js.map +1 -0
- package/dist/cli/generate-schema.d.ts +29 -0
- package/dist/cli/generate-schema.d.ts.map +1 -0
- package/dist/cli/generate-schema.js +233 -0
- package/dist/cli/generate-schema.js.map +1 -0
- package/dist/cli/index.d.ts +19 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +24 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/context.d.ts +18 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +11 -0
- package/dist/context.js.map +1 -0
- package/dist/error.d.ts +45 -0
- package/dist/error.d.ts.map +1 -0
- package/dist/error.js +29 -0
- package/dist/error.js.map +1 -0
- package/dist/extensions.d.ts +130 -0
- package/dist/extensions.d.ts.map +1 -0
- package/dist/extensions.js +78 -0
- package/dist/extensions.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/loader.d.ts +169 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +237 -0
- package/dist/loader.js.map +1 -0
- package/dist/resolver-context.d.ts +154 -0
- package/dist/resolver-context.d.ts.map +1 -0
- package/dist/resolver-context.js +184 -0
- package/dist/resolver-context.js.map +1 -0
- package/dist/schema-mapping.d.ts +30 -0
- package/dist/schema-mapping.d.ts.map +1 -0
- package/dist/schema-mapping.js +280 -0
- package/dist/schema-mapping.js.map +1 -0
- package/dist/server/cache-control.d.ts +96 -0
- package/dist/server/cache-control.d.ts.map +1 -0
- package/dist/server/cache-control.js +308 -0
- package/dist/server/cache-control.js.map +1 -0
- package/dist/server/complexity.d.ts +165 -0
- package/dist/server/complexity.d.ts.map +1 -0
- package/dist/server/complexity.js +433 -0
- package/dist/server/complexity.js.map +1 -0
- package/dist/server/config.d.ts +66 -0
- package/dist/server/config.d.ts.map +1 -0
- package/dist/server/config.js +104 -0
- package/dist/server/config.js.map +1 -0
- package/dist/server/graphiql.d.ts +5 -0
- package/dist/server/graphiql.d.ts.map +1 -0
- package/dist/server/graphiql.js +43 -0
- package/dist/server/graphiql.js.map +1 -0
- package/dist/server/index.d.ts +18 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +48 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/router.d.ts +79 -0
- package/dist/server/router.d.ts.map +1 -0
- package/dist/server/router.js +232 -0
- package/dist/server/router.js.map +1 -0
- package/dist/server/schema-builder-extensions.d.ts +42 -0
- package/dist/server/schema-builder-extensions.d.ts.map +1 -0
- package/dist/server/schema-builder-extensions.js +48 -0
- package/dist/server/schema-builder-extensions.js.map +1 -0
- package/dist/server/sse-adapter.d.ts +64 -0
- package/dist/server/sse-adapter.d.ts.map +1 -0
- package/dist/server/sse-adapter.js +227 -0
- package/dist/server/sse-adapter.js.map +1 -0
- package/dist/server/sse-types.d.ts +192 -0
- package/dist/server/sse-types.d.ts.map +1 -0
- package/dist/server/sse-types.js +63 -0
- package/dist/server/sse-types.js.map +1 -0
- package/dist/server/ws-adapter.d.ts +39 -0
- package/dist/server/ws-adapter.d.ts.map +1 -0
- package/dist/server/ws-adapter.js +247 -0
- package/dist/server/ws-adapter.js.map +1 -0
- package/dist/server/ws-types.d.ts +169 -0
- package/dist/server/ws-types.d.ts.map +1 -0
- package/dist/server/ws-types.js +11 -0
- package/dist/server/ws-types.js.map +1 -0
- package/dist/server/ws-utils.d.ts +42 -0
- package/dist/server/ws-utils.d.ts.map +1 -0
- package/dist/server/ws-utils.js +99 -0
- package/dist/server/ws-utils.js.map +1 -0
- package/package.json +61 -0
- package/src/analyzer-extension.ts +254 -0
- package/src/builder/execute.ts +153 -0
- package/src/builder/field-builders.ts +322 -0
- package/src/builder/index.ts +48 -0
- package/src/builder/pipe-api.ts +312 -0
- package/src/builder/schema-builder.ts +970 -0
- package/src/builder/type-registry.ts +670 -0
- package/src/builder/types.ts +305 -0
- package/src/context.ts +23 -0
- package/src/error.ts +32 -0
- package/src/extensions.ts +240 -0
- package/src/index.ts +32 -0
- package/src/loader.ts +363 -0
- package/src/resolver-context.ts +253 -0
- package/src/schema-mapping.ts +307 -0
- package/src/server/cache-control.ts +590 -0
- package/src/server/complexity.ts +774 -0
- package/src/server/config.ts +174 -0
- package/src/server/graphiql.ts +38 -0
- package/src/server/index.ts +96 -0
- package/src/server/router.ts +432 -0
- package/src/server/schema-builder-extensions.ts +51 -0
- package/src/server/sse-adapter.ts +327 -0
- package/src/server/sse-types.ts +234 -0
- package/src/server/ws-adapter.ts +355 -0
- package/src/server/ws-types.ts +192 -0
- package/src/server/ws-utils.ts +136 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { Config, Option } from "effect"
|
|
2
|
+
import type { ComplexityConfig } from "./complexity"
|
|
3
|
+
import type { CacheControlConfig } from "./cache-control"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for the GraphiQL UI
|
|
7
|
+
*/
|
|
8
|
+
export interface GraphiQLConfig {
|
|
9
|
+
/** Path where GraphiQL UI is served (default: "/graphiql") */
|
|
10
|
+
readonly path: string
|
|
11
|
+
/** URL where GraphiQL sends requests (default: same as graphql path) */
|
|
12
|
+
readonly endpoint: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Configuration for the GraphQL router
|
|
17
|
+
*/
|
|
18
|
+
export interface GraphQLRouterConfig {
|
|
19
|
+
/** Path for GraphQL endpoint (default: "/graphql") */
|
|
20
|
+
readonly path: string
|
|
21
|
+
/** GraphiQL configuration, or false to disable */
|
|
22
|
+
readonly graphiql: false | GraphiQLConfig
|
|
23
|
+
/** Query complexity limiting configuration */
|
|
24
|
+
readonly complexity?: ComplexityConfig
|
|
25
|
+
/** Enable introspection queries (default: true). Set to false in production. */
|
|
26
|
+
readonly introspection: boolean
|
|
27
|
+
/** Cache control configuration for HTTP Cache-Control headers */
|
|
28
|
+
readonly cacheControl?: CacheControlConfig
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Default configuration values
|
|
33
|
+
*/
|
|
34
|
+
export const defaultConfig: GraphQLRouterConfig = {
|
|
35
|
+
path: "/graphql",
|
|
36
|
+
graphiql: false,
|
|
37
|
+
complexity: undefined,
|
|
38
|
+
introspection: true,
|
|
39
|
+
cacheControl: undefined,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Normalize user-provided config (which may use boolean shorthand for graphiql)
|
|
44
|
+
* into the full GraphQLRouterConfig format
|
|
45
|
+
*/
|
|
46
|
+
export interface GraphQLRouterConfigInput {
|
|
47
|
+
readonly path?: string
|
|
48
|
+
readonly graphiql?: boolean | Partial<GraphiQLConfig>
|
|
49
|
+
/** Query complexity limiting configuration */
|
|
50
|
+
readonly complexity?: ComplexityConfig
|
|
51
|
+
/** Enable introspection queries (default: true). Set to false in production. */
|
|
52
|
+
readonly introspection?: boolean
|
|
53
|
+
/** Cache control configuration for HTTP Cache-Control headers */
|
|
54
|
+
readonly cacheControl?: CacheControlConfig
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const normalizeConfig = (input: GraphQLRouterConfigInput = {}): GraphQLRouterConfig => {
|
|
58
|
+
const path = input.path ?? defaultConfig.path
|
|
59
|
+
|
|
60
|
+
let graphiql: false | GraphiQLConfig = false
|
|
61
|
+
if (input.graphiql === true) {
|
|
62
|
+
graphiql = { path: "/graphiql", endpoint: path }
|
|
63
|
+
} else if (input.graphiql && typeof input.graphiql === "object") {
|
|
64
|
+
graphiql = {
|
|
65
|
+
path: input.graphiql.path ?? "/graphiql",
|
|
66
|
+
endpoint: input.graphiql.endpoint ?? path,
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
path,
|
|
72
|
+
graphiql,
|
|
73
|
+
complexity: input.complexity,
|
|
74
|
+
introspection: input.introspection ?? true,
|
|
75
|
+
cacheControl: input.cacheControl,
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Effect Config for loading GraphQL router configuration from environment variables.
|
|
81
|
+
*
|
|
82
|
+
* Environment variables:
|
|
83
|
+
* - GRAPHQL_PATH: Path for GraphQL endpoint (default: "/graphql")
|
|
84
|
+
* - GRAPHQL_INTROSPECTION: Enable introspection queries (default: true)
|
|
85
|
+
* - GRAPHIQL_ENABLED: Enable GraphiQL UI (default: false)
|
|
86
|
+
* - GRAPHIQL_PATH: Path for GraphiQL UI (default: "/graphiql")
|
|
87
|
+
* - GRAPHIQL_ENDPOINT: URL where GraphiQL sends requests (default: same as GRAPHQL_PATH)
|
|
88
|
+
* - GRAPHQL_MAX_DEPTH: Maximum query depth (optional)
|
|
89
|
+
* - GRAPHQL_MAX_COMPLEXITY: Maximum complexity score (optional)
|
|
90
|
+
* - GRAPHQL_MAX_ALIASES: Maximum number of aliases (optional)
|
|
91
|
+
* - GRAPHQL_MAX_FIELDS: Maximum number of fields (optional)
|
|
92
|
+
* - GRAPHQL_DEFAULT_FIELD_COMPLEXITY: Default field complexity (default: 1)
|
|
93
|
+
* - GRAPHQL_CACHE_CONTROL_ENABLED: Enable cache control headers (default: false)
|
|
94
|
+
* - GRAPHQL_CACHE_CONTROL_DEFAULT_MAX_AGE: Default maxAge for root fields (default: 0)
|
|
95
|
+
* - GRAPHQL_CACHE_CONTROL_DEFAULT_SCOPE: Default scope - PUBLIC or PRIVATE (default: PUBLIC)
|
|
96
|
+
*/
|
|
97
|
+
export const GraphQLRouterConfigFromEnv: Config.Config<GraphQLRouterConfig> = Config.all({
|
|
98
|
+
path: Config.string("GRAPHQL_PATH").pipe(Config.withDefault("/graphql")),
|
|
99
|
+
introspection: Config.boolean("GRAPHQL_INTROSPECTION").pipe(Config.withDefault(true)),
|
|
100
|
+
graphiqlEnabled: Config.boolean("GRAPHIQL_ENABLED").pipe(Config.withDefault(false)),
|
|
101
|
+
graphiqlPath: Config.string("GRAPHIQL_PATH").pipe(Config.withDefault("/graphiql")),
|
|
102
|
+
graphiqlEndpoint: Config.string("GRAPHIQL_ENDPOINT").pipe(Config.option),
|
|
103
|
+
maxDepth: Config.number("GRAPHQL_MAX_DEPTH").pipe(Config.option),
|
|
104
|
+
maxComplexity: Config.number("GRAPHQL_MAX_COMPLEXITY").pipe(Config.option),
|
|
105
|
+
maxAliases: Config.number("GRAPHQL_MAX_ALIASES").pipe(Config.option),
|
|
106
|
+
maxFields: Config.number("GRAPHQL_MAX_FIELDS").pipe(Config.option),
|
|
107
|
+
defaultFieldComplexity: Config.number("GRAPHQL_DEFAULT_FIELD_COMPLEXITY").pipe(
|
|
108
|
+
Config.withDefault(1)
|
|
109
|
+
),
|
|
110
|
+
cacheControlEnabled: Config.boolean("GRAPHQL_CACHE_CONTROL_ENABLED").pipe(
|
|
111
|
+
Config.withDefault(false)
|
|
112
|
+
),
|
|
113
|
+
cacheControlDefaultMaxAge: Config.number("GRAPHQL_CACHE_CONTROL_DEFAULT_MAX_AGE").pipe(
|
|
114
|
+
Config.withDefault(0)
|
|
115
|
+
),
|
|
116
|
+
cacheControlDefaultScope: Config.string("GRAPHQL_CACHE_CONTROL_DEFAULT_SCOPE").pipe(
|
|
117
|
+
Config.withDefault("PUBLIC")
|
|
118
|
+
),
|
|
119
|
+
}).pipe(
|
|
120
|
+
Config.map(
|
|
121
|
+
({
|
|
122
|
+
path,
|
|
123
|
+
introspection,
|
|
124
|
+
graphiqlEnabled,
|
|
125
|
+
graphiqlPath,
|
|
126
|
+
graphiqlEndpoint,
|
|
127
|
+
maxDepth,
|
|
128
|
+
maxComplexity,
|
|
129
|
+
maxAliases,
|
|
130
|
+
maxFields,
|
|
131
|
+
defaultFieldComplexity,
|
|
132
|
+
cacheControlEnabled,
|
|
133
|
+
cacheControlDefaultMaxAge,
|
|
134
|
+
cacheControlDefaultScope,
|
|
135
|
+
}) => {
|
|
136
|
+
// Check if any complexity option is set
|
|
137
|
+
const hasComplexity =
|
|
138
|
+
Option.isSome(maxDepth) ||
|
|
139
|
+
Option.isSome(maxComplexity) ||
|
|
140
|
+
Option.isSome(maxAliases) ||
|
|
141
|
+
Option.isSome(maxFields)
|
|
142
|
+
|
|
143
|
+
return {
|
|
144
|
+
path,
|
|
145
|
+
introspection,
|
|
146
|
+
graphiql: graphiqlEnabled
|
|
147
|
+
? {
|
|
148
|
+
path: graphiqlPath,
|
|
149
|
+
endpoint: Option.isSome(graphiqlEndpoint) ? graphiqlEndpoint.value : path,
|
|
150
|
+
}
|
|
151
|
+
: (false as const),
|
|
152
|
+
complexity: hasComplexity
|
|
153
|
+
? {
|
|
154
|
+
maxDepth: Option.getOrUndefined(maxDepth),
|
|
155
|
+
maxComplexity: Option.getOrUndefined(maxComplexity),
|
|
156
|
+
maxAliases: Option.getOrUndefined(maxAliases),
|
|
157
|
+
maxFields: Option.getOrUndefined(maxFields),
|
|
158
|
+
defaultFieldComplexity,
|
|
159
|
+
}
|
|
160
|
+
: undefined,
|
|
161
|
+
cacheControl: cacheControlEnabled
|
|
162
|
+
? {
|
|
163
|
+
enabled: true,
|
|
164
|
+
defaultMaxAge: cacheControlDefaultMaxAge,
|
|
165
|
+
defaultScope: (cacheControlDefaultScope === "PRIVATE"
|
|
166
|
+
? "PRIVATE"
|
|
167
|
+
: "PUBLIC") as import("../builder/types").CacheControlScope,
|
|
168
|
+
calculateHttpHeaders: true,
|
|
169
|
+
}
|
|
170
|
+
: undefined,
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate HTML for GraphiQL IDE, loading dependencies from CDN
|
|
3
|
+
*/
|
|
4
|
+
export const graphiqlHtml = (endpoint: string): string => `<!DOCTYPE html>
|
|
5
|
+
<html lang="en">
|
|
6
|
+
<head>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
9
|
+
<title>GraphiQL</title>
|
|
10
|
+
<link
|
|
11
|
+
rel="stylesheet"
|
|
12
|
+
href="https://unpkg.com/graphiql@3/graphiql.min.css"
|
|
13
|
+
/>
|
|
14
|
+
</head>
|
|
15
|
+
<body style="margin: 0; overflow: hidden;">
|
|
16
|
+
<div id="graphiql" style="height: 100vh;"></div>
|
|
17
|
+
<script
|
|
18
|
+
crossorigin
|
|
19
|
+
src="https://unpkg.com/react@18/umd/react.production.min.js"
|
|
20
|
+
></script>
|
|
21
|
+
<script
|
|
22
|
+
crossorigin
|
|
23
|
+
src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"
|
|
24
|
+
></script>
|
|
25
|
+
<script
|
|
26
|
+
crossorigin
|
|
27
|
+
src="https://unpkg.com/graphiql@3/graphiql.min.js"
|
|
28
|
+
></script>
|
|
29
|
+
<script>
|
|
30
|
+
const fetcher = GraphiQL.createFetcher({
|
|
31
|
+
url: ${JSON.stringify(endpoint)},
|
|
32
|
+
});
|
|
33
|
+
ReactDOM.createRoot(document.getElementById('graphiql')).render(
|
|
34
|
+
React.createElement(GraphiQL, { fetcher })
|
|
35
|
+
);
|
|
36
|
+
</script>
|
|
37
|
+
</body>
|
|
38
|
+
</html>`
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// Configuration types and utilities
|
|
2
|
+
export type { GraphiQLConfig, GraphQLRouterConfig, GraphQLRouterConfigInput } from "./config"
|
|
3
|
+
|
|
4
|
+
export { defaultConfig, normalizeConfig, GraphQLRouterConfigFromEnv } from "./config"
|
|
5
|
+
|
|
6
|
+
// GraphiQL HTML generator
|
|
7
|
+
export { graphiqlHtml } from "./graphiql"
|
|
8
|
+
|
|
9
|
+
// Router factory
|
|
10
|
+
export {
|
|
11
|
+
makeGraphQLRouter,
|
|
12
|
+
defaultErrorHandler,
|
|
13
|
+
type MakeGraphQLRouterOptions,
|
|
14
|
+
type ErrorHandler,
|
|
15
|
+
} from "./router"
|
|
16
|
+
|
|
17
|
+
// Schema builder extension
|
|
18
|
+
export { toRouter } from "./schema-builder-extensions"
|
|
19
|
+
|
|
20
|
+
// Complexity limiting
|
|
21
|
+
export type {
|
|
22
|
+
ComplexityConfig,
|
|
23
|
+
ComplexityResult,
|
|
24
|
+
ComplexityAnalysisInfo,
|
|
25
|
+
ComplexityExceededInfo,
|
|
26
|
+
ComplexityCalculator,
|
|
27
|
+
FieldComplexity,
|
|
28
|
+
FieldComplexityMap,
|
|
29
|
+
} from "./complexity"
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
ComplexityLimitExceededError,
|
|
33
|
+
ComplexityAnalysisError,
|
|
34
|
+
validateComplexity,
|
|
35
|
+
defaultComplexityCalculator,
|
|
36
|
+
depthOnlyCalculator,
|
|
37
|
+
combineCalculators,
|
|
38
|
+
ComplexityConfigFromEnv,
|
|
39
|
+
} from "./complexity"
|
|
40
|
+
|
|
41
|
+
// Cache control
|
|
42
|
+
export type {
|
|
43
|
+
CacheHintMap,
|
|
44
|
+
CachePolicy,
|
|
45
|
+
CacheControlConfig,
|
|
46
|
+
CachePolicyAnalysisInfo,
|
|
47
|
+
} from "./cache-control"
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
computeCachePolicy,
|
|
51
|
+
computeCachePolicyFromQuery,
|
|
52
|
+
toCacheControlHeader,
|
|
53
|
+
CacheControlConfigFromEnv,
|
|
54
|
+
} from "./cache-control"
|
|
55
|
+
|
|
56
|
+
// WebSocket subscription support
|
|
57
|
+
export type {
|
|
58
|
+
EffectWebSocket,
|
|
59
|
+
CloseEvent,
|
|
60
|
+
ConnectionContext,
|
|
61
|
+
GraphQLWSOptions,
|
|
62
|
+
GraphQLWSConfig,
|
|
63
|
+
SubscribeMessage,
|
|
64
|
+
CompleteMessage,
|
|
65
|
+
} from "./ws-types"
|
|
66
|
+
|
|
67
|
+
export { WebSocketError } from "./ws-types"
|
|
68
|
+
|
|
69
|
+
export { makeGraphQLWSHandler } from "./ws-adapter"
|
|
70
|
+
|
|
71
|
+
// WebSocket utilities for 'ws' library integration
|
|
72
|
+
export type { WsWebSocket } from "./ws-utils"
|
|
73
|
+
export { toEffectWebSocketFromWs, WS_CLOSED } from "./ws-utils"
|
|
74
|
+
|
|
75
|
+
// SSE (Server-Sent Events) subscription support
|
|
76
|
+
export type {
|
|
77
|
+
EffectSSE,
|
|
78
|
+
SSEEvent,
|
|
79
|
+
SSEEventType,
|
|
80
|
+
SSESubscriptionRequest,
|
|
81
|
+
SSEConnectionContext,
|
|
82
|
+
GraphQLSSEOptions,
|
|
83
|
+
GraphQLSSEConfig,
|
|
84
|
+
SSESubscriptionResult,
|
|
85
|
+
} from "./sse-types"
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
SSEError,
|
|
89
|
+
SSE_HEADERS,
|
|
90
|
+
formatNextEvent,
|
|
91
|
+
formatErrorEvent,
|
|
92
|
+
formatCompleteEvent,
|
|
93
|
+
formatSSEMessage,
|
|
94
|
+
} from "./sse-types"
|
|
95
|
+
|
|
96
|
+
export { makeSSESubscriptionStream, makeGraphQLSSEHandler } from "./sse-adapter"
|