diff --git a/packages/apollo/lib/drivers/apollo-base.driver.ts b/packages/apollo/lib/drivers/apollo-base.driver.ts index 85e7f0105..3d3cb49fe 100644 --- a/packages/apollo/lib/drivers/apollo-base.driver.ts +++ b/packages/apollo/lib/drivers/apollo-base.driver.ts @@ -1,5 +1,4 @@ import { ApolloServer, type BaseContext } from '@apollo/server'; -import { ApolloServerPluginLandingPageGraphQLPlayground } from '@apollo/server-plugin-landing-page-graphql-playground'; import { ApolloServerErrorCode, unwrapResolverError, @@ -7,6 +6,7 @@ import { import { expressMiddleware } from '@apollo/server/express4'; import { ApolloServerPluginLandingPageDisabled } from '@apollo/server/plugin/disabled'; import { ApolloServerPluginDrainHttpServer } from '@apollo/server/plugin/drainHttpServer'; +import { ApolloServerPluginLandingPageLocalDefault } from '@apollo/server/plugin/landingPage/default'; import { HttpStatus } from '@nestjs/common'; import { loadPackage } from '@nestjs/common/utils/load-package.util'; import { isFunction } from '@nestjs/common/utils/shared.utils'; @@ -64,9 +64,7 @@ export abstract class ApolloBaseDriver< typeof options.playground === 'object' ? options.playground : undefined; defaults = { ...defaults, - plugins: [ - ApolloServerPluginLandingPageGraphQLPlayground(playgroundOptions), - ], + plugins: [ApolloServerPluginLandingPageLocalDefault(playgroundOptions)], }; } else if ( (options.playground === undefined && diff --git a/packages/apollo/lib/interfaces/apollo-driver-config.interface.ts b/packages/apollo/lib/interfaces/apollo-driver-config.interface.ts index de9ca1b84..323695ca6 100644 --- a/packages/apollo/lib/interfaces/apollo-driver-config.interface.ts +++ b/packages/apollo/lib/interfaces/apollo-driver-config.interface.ts @@ -1,5 +1,5 @@ import { ApolloServerOptionsWithTypeDefs } from '@apollo/server'; -import { ApolloServerPluginLandingPageGraphQLPlaygroundOptions } from '@apollo/server-plugin-landing-page-graphql-playground'; +import { ApolloServerPluginLandingPageLocalDefaultOptions } from '@apollo/server/plugin/landingPage/default'; import { GqlModuleAsyncOptions, GqlModuleOptions, @@ -34,7 +34,7 @@ export interface ApolloDriverConfig /** * GraphQL playground options. */ - playground?: boolean | ApolloServerPluginLandingPageGraphQLPlaygroundOptions; + playground?: boolean | ApolloServerPluginLandingPageLocalDefaultOptions; /** * If enabled, will register a global interceptor that automatically maps diff --git a/packages/apollo/package.json b/packages/apollo/package.json index e1058f345..5ab8bb15f 100644 --- a/packages/apollo/package.json +++ b/packages/apollo/package.json @@ -37,7 +37,6 @@ "apollo-link-ws": "1.0.20" }, "dependencies": { - "@apollo/server-plugin-landing-page-graphql-playground": "4.0.0", "iterall": "1.3.0", "lodash.omit": "4.5.0", "tslib": "2.6.0" diff --git a/yarn.lock b/yarn.lock index a7b155e6b..70957e711 100644 --- a/yarn.lock +++ b/yarn.lock @@ -119,13 +119,6 @@ "@apollo/utils.keyvaluecache" "^2.1.0" "@apollo/utils.logger" "^2.0.0" -"@apollo/server-plugin-landing-page-graphql-playground@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@apollo/server-plugin-landing-page-graphql-playground/-/server-plugin-landing-page-graphql-playground-4.0.0.tgz#eff593de6c37a0b63d740f1c6498d69f67644aed" - integrity sha512-PBDtKI/chJ+hHeoJUUH9Kuqu58txQl00vUGuxqiC9XcReulIg7RjsyD0G1u3drX4V709bxkL5S0nTeXfRHD0qA== - dependencies: - "@apollographql/graphql-playground-html" "1.6.29" - "@apollo/server-plugin-response-cache@4.1.0": version "4.1.0" resolved "https://registry.yarnpkg.com/@apollo/server-plugin-response-cache/-/server-plugin-response-cache-4.1.0.tgz#2c6752bec3bb14d2901688ae631220fd37b938a2" @@ -256,13 +249,6 @@ resolved "https://registry.yarnpkg.com/@apollo/utils.withrequired/-/utils.withrequired-2.0.1.tgz#e72bc512582a6f26af150439f7eb7473b46ba874" integrity sha512-YBDiuAX9i1lLc6GeTy1m7DGLFn/gMnvXqlalOIMjM7DeOgIacEjjfwPqb0M1CQ2v11HhR15d1NmxJoRCfrNqcA== -"@apollographql/graphql-playground-html@1.6.29": - version "1.6.29" - resolved "https://registry.yarnpkg.com/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.29.tgz#a7a646614a255f62e10dcf64a7f68ead41dec453" - integrity sha512-xCcXpoz52rI4ksJSdOCxeOCn2DLocxwHf9dVT/Q90Pte1LX+LY+91SFtJF3KXVHH8kEin+g1KKCQPKBjZJfWNA== - dependencies: - xss "^1.0.8" - "@as-integrations/fastify@2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@as-integrations/fastify/-/fastify-2.1.0.tgz#85794b9a12ab54c2b9210a61017a9662d5662213" @@ -3438,11 +3424,6 @@ commander@11.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-11.0.0.tgz#43e19c25dbedc8256203538e8d7e9346877a6f67" integrity sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ== -commander@^2.20.3: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - compare-func@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" @@ -3669,11 +3650,6 @@ crypto-random-string@^4.0.0: dependencies: type-fest "^1.0.1" -cssfilter@0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/cssfilter/-/cssfilter-0.0.10.tgz#c6d2672632a2e5c83e013e6864a42ce8defd20ae" - integrity sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw== - dargs@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" @@ -10473,14 +10449,6 @@ xdg-basedir@^5.0.1, xdg-basedir@^5.1.0: resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-5.1.0.tgz#1efba19425e73be1bc6f2a6ceb52a3d2c884c0c9" integrity sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ== -xss@^1.0.8: - version "1.0.14" - resolved "https://registry.yarnpkg.com/xss/-/xss-1.0.14.tgz#4f3efbde75ad0d82e9921cc3c95e6590dd336694" - integrity sha512-og7TEJhXvn1a7kzZGQ7ETjdQVS2UfZyTlsEdDOqvQF7GoxNfY+0YLCzBy1kPdsDDx4QuNAonQPddpsn6Xl/7sw== - dependencies: - commander "^2.20.3" - cssfilter "0.0.10" - xtend@^4.0.0, xtend@^4.0.2, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"