Skip to content

Commit

Permalink
chore(deps): update dependency vite to v3 (master) (#1444)
Browse files Browse the repository at this point in the history
* chore(deps): update actions/checkout action to v3 (#1431)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency ioredis to v5.2.2 (#1450)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Replace cross-undici-fetch with @whatwg-node/fetch

* chore(deps): update dependency vite to v3

* Fix GraphiQL build

* Go

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
  • Loading branch information
renovate[bot] and ardatan committed Jul 27, 2022
1 parent 3541a88 commit 4c8fb51
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 69 deletions.
134 changes: 67 additions & 67 deletions packages/graphql-yoga/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,73 +95,73 @@ export type YogaServerOptions<
TServerContext extends Record<string, any>,
TUserContext extends Record<string, any>,
TRootValue,
> = {
/**
* Enable/disable logging or provide a custom logger.
* @default true
*/
logging?: boolean | YogaLogger
/**
* Prevent leaking unexpected errors to the client. We highly recommend enabling this in production.
* If you throw `GraphQLYogaError`/`EnvelopError` within your GraphQL resolvers then that error will be sent back to the client.
*
* You can lean more about this here:
* @see https://graphql-yoga.vercel.app/docs/features/error-masking
*
* Default: `true`
*/
maskedErrors?: boolean | UseMaskedErrorsOpts
/**
* Context
*/
context?:
> = {
/**
* Enable/disable logging or provide a custom logger.
* @default true
*/
logging?: boolean | YogaLogger
/**
* Prevent leaking unexpected errors to the client. We highly recommend enabling this in production.
* If you throw `GraphQLYogaError`/`EnvelopError` within your GraphQL resolvers then that error will be sent back to the client.
*
* You can lean more about this here:
* @see https://graphql-yoga.vercel.app/docs/features/error-masking
*
* Default: `true`
*/
maskedErrors?: boolean | UseMaskedErrorsOpts
/**
* Context
*/
context?:
| ((
initialContext: YogaInitialContext & TServerContext,
) => Promise<TUserContext> | TUserContext)
initialContext: YogaInitialContext & TServerContext,
) => Promise<TUserContext> | TUserContext)
| Promise<TUserContext>
| TUserContext

cors?: CORSPluginOptions<TServerContext>
cors?: CORSPluginOptions<TServerContext>

/**
* GraphQL endpoint
*/
endpoint?: string
/**
* GraphQL endpoint
*/
endpoint?: string

/**
* GraphiQL options
*
* Default: `true`
*/
graphiql?: GraphiQLOptionsOrFactory<TServerContext>
/**
* GraphiQL options
*
* Default: `true`
*/
graphiql?: GraphiQLOptionsOrFactory<TServerContext>

renderGraphiQL?: (options?: GraphiQLOptions) => PromiseOrValue<BodyInit>
renderGraphiQL?: (options?: GraphiQLOptions) => PromiseOrValue<BodyInit>

schema?:
schema?:
| GraphQLSchema
| {
typeDefs: TypeSource
resolvers?:
| IResolvers<
TRootValue,
TUserContext & TServerContext & YogaInitialContext
>
| Array<
IResolvers<
TRootValue,
TUserContext & TServerContext & YogaInitialContext
>
>
}
typeDefs: TypeSource
resolvers?:
| IResolvers<
TRootValue,
TUserContext & TServerContext & YogaInitialContext
>
| Array<
IResolvers<
TRootValue,
TUserContext & TServerContext & YogaInitialContext
>
>
}

parserCache?: boolean | ParserCacheOptions
validationCache?: boolean | ValidationCache
fetchAPI?: FetchAPI
multipart?: boolean
id?: string
} & Partial<
OptionsWithPlugins<TUserContext & TServerContext & YogaInitialContext>
>
parserCache?: boolean | ParserCacheOptions
validationCache?: boolean | ValidationCache
fetchAPI?: FetchAPI
multipart?: boolean
id?: string
} & Partial<
OptionsWithPlugins<TUserContext & TServerContext & YogaInitialContext>
>

export function getDefaultSchema() {
return makeExecutableSchema({
Expand Down Expand Up @@ -206,7 +206,7 @@ export class YogaServer<
TServerContext extends Record<string, any>,
TUserContext extends Record<string, any>,
TRootValue,
> {
> {
/**
* Instance of envelop
*/
Expand Down Expand Up @@ -238,9 +238,9 @@ export class YogaServer<
? isSchema(options.schema)
? options.schema
: makeExecutableSchema({
typeDefs: options.schema.typeDefs,
resolvers: options.schema.resolvers,
})
typeDefs: options.schema.typeDefs,
resolvers: options.schema.resolvers,
})
: getDefaultSchema()

const logger = options?.logging != null ? options.logging : true
Expand All @@ -249,11 +249,11 @@ export class YogaServer<
? logger === true
? defaultYogaLogger
: {
debug: () => {},
error: () => {},
warn: () => {},
info: () => {},
}
debug: () => { },
error: () => { },
warn: () => { },
info: () => { },
}
: logger

const maskedErrors = options?.maskedErrors ?? true
Expand Down Expand Up @@ -619,8 +619,8 @@ export function createYoga<
TServerContext extends Record<string, any> = {},
TUserContext extends Record<string, any> = {},
TRootValue = {},
>(
options?: YogaServerOptions<TServerContext, TUserContext, TRootValue>,
>(
options?: YogaServerOptions<TServerContext, TUserContext, TRootValue>,
): YogaServerInstance<TServerContext, TUserContext, TRootValue> {
const server = new YogaServer<TServerContext, TUserContext, TRootValue>(
options,
Expand Down
43 changes: 41 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3361,7 +3361,7 @@
tslib "^2.4.0"
value-or-promise "1.0.11"

"@graphql-tools/url-loader@7.13.0", "@graphql-tools/url-loader@^7.0.11", "@graphql-tools/url-loader@^7.9.7":
"@graphql-tools/url-loader@7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-7.13.0.tgz#f1523ae782b846b0d06dc8488b622ba8ce9a7f33"
integrity sha512-hM3yIDij0EqrHrLKNRpFRhQD0tmzt7E5OevOL9O3CLKCcv2Ho4wXQD7gscwVJJdg2Qyr22Pqr/IdtR8QiMScRA==
Expand Down Expand Up @@ -3403,6 +3403,27 @@
value-or-promise "^1.0.11"
ws "^8.3.0"

"@graphql-tools/url-loader@^7.0.11", "@graphql-tools/url-loader@^7.9.7":
version "7.11.0"
resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-7.11.0.tgz#c04d4d9f18af58230b589bdd55e81a003e19e5d6"
integrity sha512-c3L/NW9MRkYct4FoQQubTf/VeBhPm0lry2EsgDdcdKmV+lOh3RQ4DAYMH61cTX++MPeQiECYEwCCm68J52xlMg==
dependencies:
"@graphql-tools/delegate" "8.8.0"
"@graphql-tools/utils" "8.8.0"
"@graphql-tools/wrap" "8.5.0"
"@n1ru4l/graphql-live-query" "^0.9.0"
"@types/ws" "^8.0.0"
cross-undici-fetch "^0.4.0"
dset "^3.1.2"
extract-files "^11.0.0"
graphql-ws "^5.4.1"
isomorphic-ws "^4.0.1"
meros "^1.1.4"
sync-fetch "^0.4.0"
tslib "^2.4.0"
value-or-promise "^1.0.11"
ws "^8.3.0"

"@graphql-tools/utils@8.6.9":
version "8.6.9"
resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-8.6.9.tgz#fe1b81df29c9418b41b7a1ffe731710b93d3a1fe"
Expand Down Expand Up @@ -8783,6 +8804,19 @@ cross-undici-fetch@^0.3.5:
undici "^5.1.0"
web-streams-polyfill "^3.2.0"

cross-undici-fetch@^0.4.0:
version "0.4.14"
resolved "https://registry.yarnpkg.com/cross-undici-fetch/-/cross-undici-fetch-0.4.14.tgz#c841b4fa3cb12b3c3da13dd09f7be45a7bef5ae7"
integrity sha512-CCep44A/baoO8kYJBIR1cRO/tRAk29xzb/tH3O85OtgwZGkL5I0tJZ47ccZdrnAJxrl5tlaYhAOx09fJXMcUqQ==
dependencies:
abort-controller "^3.0.0"
busboy "^1.6.0"
form-data-encoder "^1.7.1"
formdata-node "^4.3.1"
node-fetch "^2.6.7"
undici "5.5.1"
web-streams-polyfill "^3.2.0"

crypt@0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
Expand Down Expand Up @@ -20549,11 +20583,16 @@ undici@5.0.0:
resolved "https://registry.yarnpkg.com/undici/-/undici-5.0.0.tgz#3c1e08c7f0df90c485d5d8dbb0517e11e34f2090"
integrity sha512-VhUpiZ3No1DOPPQVQnsDZyfcbTTcHdcgWej1PdFnSvOeJmOVDgiOHkunJmBLfmjt4CqgPQddPVjSWW0dsTs5Yg==

undici@5.5.1, undici@^5.1.0:
undici@5.5.1:
version "5.5.1"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.5.1.tgz#baaf25844a99eaa0b22e1ef8d205bffe587c8f43"
integrity sha512-MEvryPLf18HvlCbLSzCW0U00IMftKGI5udnjrQbC5D4P0Hodwffhv+iGfWuJwg16Y/TK11ZFK8i+BPVW2z/eAw==

undici@^5.1.0:
version "5.8.0"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.8.0.tgz#dec9a8ccd90e5a1d81d43c0eab6503146d649a4f"
integrity sha512-1F7Vtcez5w/LwH2G2tGnFIihuWUlc58YidwLiCv+jR2Z50x0tNXpRRw7eOIJ+GvqCqIkg9SB7NWAJ/T9TLfv8Q==

unicode-canonical-property-names-ecmascript@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc"
Expand Down

0 comments on commit 4c8fb51

Please sign in to comment.