apollographql / apollographql/apollo-server

Add theme configuration support to ApolloServerPluginLandingPageLocalDefault

Open
#8,151 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
14k
Forks
2k
Avg merge
2d 14h
Merged PRs (30d)
2

Description

### Feature Request

**Is your feature request related to a problem? Please describe.**

Currently, `ApolloServerPluginLandingPageProductionDefault` supports theme configuration (light/dark mode) via the `document` option, but `ApolloServerPluginLandingPageLocalDefault` does not offer this capability.

**Describe the solution you'd like**

I would like `ApolloServerPluginLandingPageLocalDefault` to support the same `document` configuration option as `ApolloServerPluginLandingPageProductionDefault`:

Example usage:
```typescript
plugins: [
ApolloServerPluginLandingPageLocalDefault({
initialState: {
displayOptions: {
theme: 'dark', // or 'light'
}
},
}),
]
```

**Describe alternatives you've considered**

1. **Using Production Landing Page in Development**: I specifically do not want to rely on production landing page as it require to login to studio apollo graphql, while I only use this page for local development.

**Additional context**

- The production landing page already has this feature implemented, suggesting the underlying infrastructure exists
- This appears to be a straightforward feature parity issue rather than a fundamental architectural limitation

Contributor guide

Open the contributing guide

Research direction

Compare the ApolloServerPluginLandingPageLocalDefault and ApolloServerPluginLandingPageProductionDefault entry points, then inspect the existing production landing-page tests for document or theme configuration. Confirm whether the requested local option is document or initialState, add equivalent local support, and update tests to cover light and dark themes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.