How awslabs/aws-mobile-appsync-sdk-js works
Main Components
a. Core Components:
• Auth Link Package (aws-appsync-auth-link)
• Subscription Link Package (aws-appsync-subscription-link)
• Apollo Client Integration Layer
• AWS AppSync Service Connection
b. Authentication Components:
• API Key Auth
• Cognito User Pools
• IAM Authentication
• OpenID Connect
c. Communication Layers:
• HTTP/HTTPS Layer
• WebSocket Layer (for subscriptions)
• Signing/Authorization Layer
[Client Application Layer]
• ↓
[Apollo Client V3]
• ↓
[AWS AppSync Links Layer]
• Auth Link
• Signer Module
• Subscription Link
• Handshake Module
• WebSocket Handler
[AWS AppSync Service]
• GraphQL API
• Authentication
• Data Sources
Specific Implementation Details
Key architectural elements:
[Auth Link Implementation]
• Platform-specific auth handling
• Request signing
• Multiple auth mode support
[Subscription Link Implementation]
• Real-time subscription handling
• Connection management
• Retry logic
Integration Points
Clear integration points for:
• Apollo Client configuration
• Authentication providers
• WebSocket connections
• HTTP/HTTPS endpoints
Additional Elements
A section for:
• Configuration options
• Environment-specific settings
• Platform-specific implementations (React Native vs Web)