@influxdata/influxdb3-client 1.5.0-nightly.11067 → 1.5.0-nightly.11460
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -190,11 +190,43 @@ for await (const row of queryPointsResult) {
|
|
|
190
190
|
|
|
191
191
|
### gRPC Compression
|
|
192
192
|
|
|
193
|
-
The JavaScript client
|
|
193
|
+
The JavaScript client has **gRPC response compression enabled by default** for all query operations.
|
|
194
194
|
|
|
195
195
|
If the server chooses to compress query responses (e.g., with gzip), the client
|
|
196
196
|
will automatically decompress them — no extra configuration is required.
|
|
197
197
|
|
|
198
|
+
#### Why Response Compression Cannot Be Disabled
|
|
199
|
+
|
|
200
|
+
The `grpc-accept-encoding` header is hardcoded in the underlying `@grpc/grpc-js` library:
|
|
201
|
+
|
|
202
|
+
```javascript
|
|
203
|
+
headers.set('grpc-accept-encoding', 'identity,deflate,gzip');
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
This means:
|
|
207
|
+
|
|
208
|
+
- The client always advertises support for gzip and deflate compression
|
|
209
|
+
- If the server supports compression, responses will be compressed
|
|
210
|
+
- There is no per-client or per-call option to disable response decompression
|
|
211
|
+
|
|
212
|
+
#### Request Compression
|
|
213
|
+
|
|
214
|
+
Request compression (client-to-server) can be configured using the `grpcOptions` setting:
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
const client = new InfluxDBClient({
|
|
218
|
+
host: 'https://your-influxdb-host',
|
|
219
|
+
token: 'your-token',
|
|
220
|
+
grpcOptions: {
|
|
221
|
+
// 0 = none/identity, 1 = deflate, 2 = gzip
|
|
222
|
+
'grpc.default_compression_algorithm': 2,
|
|
223
|
+
},
|
|
224
|
+
})
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Although, InfluxDB servers may not support compressed requests and will reject them
|
|
228
|
+
with an error like `Content is compressed with 'gzip' which isn't supported`.
|
|
229
|
+
|
|
198
230
|
## Examples
|
|
199
231
|
|
|
200
232
|
For more advanced usage, see [examples](https://github.com/InfluxCommunity/influxdb3-js/blob/HEAD/examples/README.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@influxdata/influxdb3-client",
|
|
3
|
-
"version": "1.5.0-nightly.
|
|
3
|
+
"version": "1.5.0-nightly.11460",
|
|
4
4
|
"description": "The Client that provides a simple and convenient way to interact with InfluxDB 3.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "yarn cp ../../README.md ./README.md && yarn run clean && yarn run build:browser && yarn run build:node",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"apache-arrow": "^19.0.0",
|
|
93
93
|
"grpc-web": "^2.0.2"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "81c8ac4806de9a6f1c4a6ad76f1d4a9f1624ae61"
|
|
96
96
|
}
|