Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): remove apollo-server-plugin-landing-page-graphql-playground #2973

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elijaholmos
Copy link

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #2972

What is the new behavior?

Removes the deprecated dependency @apollo/server-plugin-landing-page-graphql-playground, described in #2972. Follows the official guide published by the Apollo team at https://www.apollographql.com/docs/apollo-server/api/plugin/landing-pages/#configuring-default-landing-pages to migrate to the new replacement.

Does this PR introduce a breaking change?

  • Yes
  • No

@elijaholmos elijaholmos changed the title chore(deps): remove apollo-server-plugin-landing-page-graphql-playground fix(deps): remove apollo-server-plugin-landing-page-graphql-playground Aug 18, 2023
@twestendorff
Copy link

@elijaholmos How can I support that this MR is accepted and merged? We also see this warning regularly and would like to fix it.

@elijaholmos
Copy link
Author

@twestendorff, sorry, I am not a maintainer of this repository, only a first-time contributor. One of the team members would need to approve & merge this PR. Sadly, it has been over a year without any activity, so I am not optimistic

@cbnsndwch
Copy link

Coming here after doing some JS type trickery to make @nestjs/apollo use the embedded studio landing page plugin. The Playground plugin has been EOL since 2022 and while I'm not super happy about all the upsells in the embedded studio page it's actually a really good experience for local dev.

Can confirm it works as a drop-in replacements to playground

@cbnsndwch
Copy link

Here's my current workaround, in case this doesn't get merged:

import { ConfigService } from '@nestjs/config';
import { GraphQLModule } from '@nestjs/graphql';

import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { ApolloServerPluginLandingPageLocalDefault } from '@apollo/server/plugin/landingPage/default';

import { configModule } from '../config';

export const graphqlModule = GraphQLModule.forRootAsync<ApolloDriverConfig>({
    driver: ApolloDriver,
    imports: [configModule],
    inject: [ConfigService],
    async useFactory(configService: ConfigService) {
        const { APP_ENV } = configService.get<any>('app');

        const isDev = APP_ENV === 'dev';

        const plugins = [];
        if (isDev) {
            plugins.push(
                ApolloServerPluginLandingPageLocalDefault({
                    footer: false,
                    embed: true
                })
            );
        }

        return {
            playground: 0 as any, // <- this
            plugins
            // ... other options here
        } satisfies ApolloDriverConfig;
    }
});

@twestendorff
Copy link

@elijaholmos I saw that but still wanted to offer my help, maybe there is an issue that I don't know why this MR is not accepted/merged.

It's a sad that it's been open for so long. 2022 is already some time ago.

@kamilmysliwiec can you as a maintainer help here?

@kamilmysliwiec
Copy link
Member

If someone wants to use Apollo Studio instead, they can register a dedicated plugin. We remain using GrapQL Playground as the default to avoid introducing unnecessary breaking changes - there's really no rush in migrating to the different version (no security issues whatsoever that would force us to do so too)

@nestjs nestjs locked and limited conversation to collaborators Sep 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants