Skip to content

Feat/graphql feature toggling#651

Merged
RUKAYAT-CODER merged 2 commits into
rinafcode:mainfrom
Faromzy:feat/graphql-feature-toggling
Jun 1, 2026
Merged

Feat/graphql feature toggling#651
RUKAYAT-CODER merged 2 commits into
rinafcode:mainfrom
Faromzy:feat/graphql-feature-toggling

Conversation

@Faromzy

@Faromzy Faromzy commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

feat: add feature toggling to GraphQL client

Implements feature flag gating for the GraphQL subscription client so real-time
WebSocket connections can be controlled per-user without touching application
code.

Changes:

  • Added optional featureGate?: { flagId, context? } to SubscriptionConfig —
    fully backwards-compatible, existing callers unaffected
  • Added isFeatureEnabled(flagId, context) — thin wrapper over the existing
    flagStore + evaluateFlag (no new infrastructure)
  • createSubscriptionClient evaluates the gate at client creation time: flag
    enabled → WS + HTTP split link (existing behaviour); flag disabled/missing →
    HTTP-only link (queries/mutations still work, subscriptions silently skipped)

Testing: 8 unit tests — isFeatureEnabled (missing/disabled/enabled flag) and
createSubscriptionClient (no gate, gate on, gate off, missing flag, targeting
strategy with user context)

Closes #491

Faromzy added 2 commits June 1, 2026 05:26
- Add ModalSize type (sm | md | lg | xl | full) and SIZE_CLASSES map
- Replace hardcoded max-w-md with size prop (default: md)
- Update ShareModal to use size prop instead of className override
- Add 12 unit tests covering all size classes and close paths
- Add featureGate option to SubscriptionConfig
- Add isFeatureEnabled helper using existing flagStore/evaluateFlag
- Gate WebSocket link creation behind feature flag; HTTP always available
- Add 8 unit tests covering all gate scenarios
@drips-wave

drips-wave Bot commented Jun 1, 2026

Copy link
Copy Markdown

@Faromzy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit a5bc2a6 into rinafcode:main Jun 1, 2026
4 of 6 checks passed
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.

bug GraphQL Client : Feature Toggling

2 participants