-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
Allow configuring authorization #2716
Conversation
Reviewer's Guide by SourceryThis PR implements configurable authorization by introducing a type-safe authorization system with support for different authorization types (API Key, Basic, Bearer, OAuth2). It adds the ability to configure initial authorization settings through configuration options and updates the authorization providers to use a more structured input format. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @imolorhe - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -1,11 +1,20 @@ | |||
import { AuthorizationResult } from '../types/state/authorization.interface'; | |||
|
|||
export interface AuthorizationProviderExecuteOptions<T = unknown> { | |||
export interface AuthorizationProviderExecuteOptions< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Consider improving type safety in AuthorizationProviderExecuteOptions
The type T['data'] assumes data exists, but the parameter is marked as possibly undefined. Consider using T extends BaseAuthorizationProviderInput['data'] for better type safety.
Visit the preview URL for this PR (updated for commit 69c7ec3): https://altair-gql--pr2716-imolorhe-allow-confi-6qrbylpv.web.app (expires Sat, 30 Nov 2024 19:22:40 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 02d6323d75a99e532a38922862e269d63351a6cf |
Fixes
Checks
yarn test-build
Changes proposed in this pull request:
Summary by Sourcery
Allow configuration of initial authorization settings in the Altair GraphQL client, refactor authorization provider inputs for consistency, and update tests and documentation accordingly.
New Features:
Enhancements:
Documentation:
Tests: