Dart WebSocket client template doesn't support query parameters from channel bindings
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 397
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 25
Description
The Dart WebSocket client template doesn't extract or use query parameters defined in channel bindings, unlike the Python template. This prevents authentication tokens and other important parameters from being passed to WebSocket connections.
When a channel defines query parameters in its bindings (e.g., `auth_token` for authentication), the generated JavaScript client should:
1. Accept these parameters in the constructor
2. Automatically append them to the WebSocket URL as query strings
```dart
// Expected generated code
ExampleClient({String? url, String? auth_token})
: _url = _buildUrl(url ?? 'wss://default-url', auth_token);
static String _buildUrl(String baseUrl, String? authToken) {
if (authToken == null) return baseUrl;
return '$baseUrl?auth_token=$authToken';
}
Contributor guide
Research direction
Start with the Dart WebSocket client template and compare its handling of channel bindings with the Python template. Verify the generated constructor accepts binding query parameters and that generated WebSocket URLs include those parameters, then run the template's available tests or generation checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100