Skip to content

Comments

Allow pinning altair-static package version via AltairOptions#1211

Open
ben-schmidt wants to merge 1 commit intographql-dotnet:masterfrom
ben-schmidt:allow-pinning-a-specific-Altair-version
Open

Allow pinning altair-static package version via AltairOptions#1211
ben-schmidt wants to merge 1 commit intographql-dotnet:masterfrom
ben-schmidt:allow-pinning-a-specific-Altair-version

Conversation

@ben-schmidt
Copy link

This PR introduces the ability for users of graphql-dotnet to explicitly pin the version of altair-static used by the Altair UI integration.
Previously, the middleware always relied on loading the latest version of Altair from a CDN. While convenient, this caused a number of issues when upstream Altair releases introduced breaking changes or unexpected behavior—changes that were immediately reflected in running applications without any modification by the user.

Why This Matters

Relying on a moving/latest CDN target can result in:

  • Sudden UI breakages after upstream releases
  • Hard-to-debug regressions when the Altair team publishes updates
  • Inconsistent environments between development, testing, and production

By enabling version pinning, applications get:

  • Full control over the exact Altair version used
  • Stable and deterministic deployments
  • Separation between application updates and external frontend changes

What This PR Does

  • Adds support for specifying the exact altair-static version to load
  • Falls back to the previous CDN behavior when no version is specified
  • Keeps the default experience simple while giving advanced users control and stability
app.UseGraphQLAltair(options =>
{
    options.AltairVersion = "8.5.1"; // Pin a specific version (optional parameter; if not set previous CDN behaviour is used)
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants