packages/server/README_landingpages.md
If users don't manually install any plugin that implements renderLandingPage, Apollo Server does the following by default:
NODE_ENV is not production), Apollo Server installs ApolloServerPluginLandingPageLocalDefault.NODE_ENV is production), Apollo Server installs ApolloServerPluginLandingPageProductionDefault.The ApolloServerPluginLandingPageProductionDefault shows a minimalist landing page:
This landing page is rendered via a script tag in the index of the landingPage directory. This tag references a CDN upload that contains the built version of the contents of the studio-landing-page repo. This repo uploads versioned and latest CDN bundles on merge to main.
Configuration params are passed from the user defined config in Apollo Server to the CDN bundle via window.landingPage. They are consumed in the studio-landing-page repo here.
The ApolloServerPluginLandingPageLocalDefault shows an embedded Sandbox:
The embedded Sandbox is rendered via a script tag in the index of the landingPage directory. This tag references a CDN upload that contains the built version of the contents of the @apollo/sandbox package in the embeddable-explorer repo. This repo uploads versioned and latest CDN bundles on merge to main.
Configuration params are passed to the window.EmbeddedSandbox instance which creates an EmbeddedSandbox instance.
The ApolloServerPluginLandingPageProductionDefault, when configured with a graphRef, shows an embedded Explorer.
The embedded Explorer is rendered via a script tag in the index of the landingPage directory. This tag references a CDN upload that contains the built version of the contents of the @apollo/explorer package in the embeddable-explorer repo. This repo uploads versioned and latest CDN bundles on merge to main.
Configuration params are passed to the window.EmbeddedExplorer instance which creates an EmbeddedSandbox instance.