JavaScript 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
## Problem
The JavaScript 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.
## Expected Behavior
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
Example:
```javascript
// Expected generated code
constructor(url, auth_token) {
const params = {};
if (auth_token) params['auth_token'] = auth_token;
const qs = new URLSearchParams(params).toString();
this.url = qs ? `${url}?${qs}` : url;
}
Contributor guide
Research direction
Start by locating the JavaScript WebSocket client template and comparing its channel-binding handling with the Python template. Trace how query parameters are represented, then verify that generated constructors accept them and append them to the WebSocket URL, including the no-parameters case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100