Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add endpoints for graphql api #108

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

burhaaan
Copy link

@burhaaan burhaaan commented May 5, 2023

Check out my loom here: https://www.loom.com/share/5a05f62b1e08487897e4039ff774ee58

Description

This PR introduces changes to the GraphQL API to support the feature flag service and adds two mutations and one query. The schema, mutations, queries, and resolvers have been updated to manage feature flags for users, fetch all users with their associated feature flags, and update feature flag assignments for a specific user. These changes enable better feature flag management in the application, allowing clients to easily assign, retrieve, and update feature flag values for users.

Changes

  • Added a new query allUsersWithFeatureFlags to fetch all users and their associated feature flags.

  • Implemented a new mutation assignFeatureFlagToUsers to target one or more users with a specific feature flag.

  • Implemented a new mutation updateFeatureFlagAssignment to change the value of a feature flag for a specific user.

  • Updated resolvers to process SQL query results, create the hierarchical data structure, and handle new mutations and queries.

Areas for Improvement

  • Add error handling and validation: Enhance the GraphQL resolvers to handle potential errors and validate input data.

  • Implement pagination: Introduce pagination support for the allUsersWithFeatureFlags query to handle large datasets efficiently and improve API response times.

Concluding Thoughts

The changes introduced in this PR provide a solid foundation for managing user-feature flag relationships in the GraphQL API. By implementing these updates, clients can easily assign, retrieve, and update feature flag values for users, improving the overall feature flag management experience. Future enhancements should focus on optimizing performance, adding error handling and validation.

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

Successfully merging this pull request may close these issues.

None yet

1 participant