Files
Adam Holt aa302209b0 Add Streamable HTTP mode (#1849)
Adds new `http` command supporting Streamable HTTP support, OAuth Metadata handler and Scope filtering.

Co-authored-by: kerobbi <kerobbi@github.com>
Co-authored-by: Matt Holloway <mattdholloway@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-06 15:33:41 +01:00

20 lines
580 B
Go

package context
import "context"
// graphQLFeaturesKey is a context key for GraphQL feature flags
type graphQLFeaturesKey struct{}
// withGraphQLFeatures adds GraphQL feature flags to the context
func WithGraphQLFeatures(ctx context.Context, features ...string) context.Context {
return context.WithValue(ctx, graphQLFeaturesKey{}, features)
}
// GetGraphQLFeatures retrieves GraphQL feature flags from the context
func GetGraphQLFeatures(ctx context.Context) []string {
if features, ok := ctx.Value(graphQLFeaturesKey{}).([]string); ok {
return features
}
return nil
}