@@ -81,7 +81,6 @@ import { useLimitBatching } from './plugins/requestValidation/useLimitBatching.j
81
81
export type YogaServerOptions <
82
82
TServerContext extends Record < string , any > ,
83
83
TUserContext extends Record < string , any > ,
84
- TRootValue ,
85
84
> = {
86
85
/**
87
86
* Enable/disable logging or provide a custom logger.
@@ -147,8 +146,7 @@ export type YogaServerOptions<
147
146
renderGraphiQL ?: ( options ?: GraphiQLOptions ) => PromiseOrValue < BodyInit >
148
147
149
148
schema ?: YogaSchemaDefinition <
150
- TUserContext & TServerContext & YogaInitialContext ,
151
- TRootValue
149
+ TUserContext & TServerContext & YogaInitialContext
152
150
>
153
151
154
152
/**
@@ -199,7 +197,6 @@ export type BatchingOptions =
199
197
export class YogaServer <
200
198
TServerContext extends Record < string , any > ,
201
199
TUserContext extends Record < string , any > ,
202
- TRootValue ,
203
200
> {
204
201
/**
205
202
* Instance of envelop
@@ -221,9 +218,7 @@ export class YogaServer<
221
218
private maskedErrorsOpts : YogaMaskedErrorOpts | null
222
219
private id : string
223
220
224
- constructor (
225
- options ?: YogaServerOptions < TServerContext , TUserContext , TRootValue > ,
226
- ) {
221
+ constructor ( options ?: YogaServerOptions < TServerContext , TUserContext > ) {
227
222
this . id = options ?. id ?? 'yoga'
228
223
this . fetchAPI =
229
224
options ?. fetchAPI ??
@@ -662,21 +657,14 @@ export class YogaServer<
662
657
export type YogaServerInstance <
663
658
TServerContext extends Record < string , any > ,
664
659
TUserContext extends Record < string , any > ,
665
- TRootValue extends Record < string , any > ,
666
- > = ServerAdapter <
667
- TServerContext ,
668
- YogaServer < TServerContext , TUserContext , TRootValue >
669
- >
660
+ > = ServerAdapter < TServerContext , YogaServer < TServerContext , TUserContext > >
670
661
671
662
export function createYoga <
672
663
TServerContext extends Record < string , any > = { } ,
673
664
TUserContext extends Record < string , any > = { } ,
674
- TRootValue extends Record < string , any > = { } ,
675
665
> (
676
- options : YogaServerOptions < TServerContext , TUserContext , TRootValue > ,
677
- ) : YogaServerInstance < TServerContext , TUserContext , TRootValue > {
678
- const server = new YogaServer < TServerContext , TUserContext , TRootValue > (
679
- options ,
680
- )
666
+ options : YogaServerOptions < TServerContext , TUserContext > ,
667
+ ) : YogaServerInstance < TServerContext , TUserContext > {
668
+ const server = new YogaServer < TServerContext , TUserContext > ( options )
681
669
return createServerAdapter ( server , server . fetchAPI . Request )
682
670
}
0 commit comments