Skip to content

Commit

Permalink
Release 1.2.0 (connectrpc#339)
Browse files Browse the repository at this point in the history
## What's Changed
* Add a distinguishing factor between infinite query keys and regular
query keys by @paul-sachs in
connectrpc#334
* Add support for enabled to useInfiniteQuery by @paul-sachs in
connectrpc#338

## Changes to infinite query keys

With connectrpc#334, we're
fixing a bug where the cache of a regular query collides with the cache
of an infinite query, which can lead to type mismatches and unexpected
failures if you use the same RPC with an infinite query and a regular
query.
We are now using a separate query key for infinite queries to solve the
issue (we append "infinite" to the key), but this change can potentially
affect you:

If you tried to invalidate some infinite queries like
`queryClient.invalidateQueries({ queryKey: createConnectQueryKey(...),
exact: true })`, this now only invalidates queries initialized with
`useQuery`. To invalidate infinite queries, you can either set `exact`
to false, or use `createConnectInfiniteQueryKey()` instead. Also note
that this change not only affects `invalidateQueries` but any operations
against the queryClient that interact with the cache using a key (eg,
queryClient.setQueriesData, etc.)

**Full Changelog**:
connectrpc/connect-query-es@v1.1.3...v1.2.0
  • Loading branch information
paul-sachs authored Feb 8, 2024
1 parent 74b0c27 commit c7e0c66
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-connect-query v1.1.3 with parameter "target=ts,import_extension=none,ts_nocheck=false"
// @generated by protoc-gen-connect-query v1.2.0 with parameter "target=ts,import_extension=none,ts_nocheck=false"
// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3)
/* eslint-disable */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-connect-query v1.1.3 with parameter "target=ts,import_extension=none,ts_nocheck=false"
// @generated by protoc-gen-connect-query v1.2.0 with parameter "target=ts,import_extension=none,ts_nocheck=false"
// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3)
/* eslint-disable */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-connect-query v1.1.3 with parameter "target=ts,import_extension=none,ts_nocheck=false"
// @generated by protoc-gen-connect-query v1.2.0 with parameter "target=ts,import_extension=none,ts_nocheck=false"
// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3)
/* eslint-disable */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-connect-query v1.1.3 with parameter "target=ts,import_extension=none,ts_nocheck=false"
// @generated by protoc-gen-connect-query v1.2.0 with parameter "target=ts,import_extension=none,ts_nocheck=false"
// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3)
/* eslint-disable */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-connect-query v1.1.3 with parameter "target=ts,import_extension=none,ts_nocheck=false"
// @generated by protoc-gen-connect-query v1.2.0 with parameter "target=ts,import_extension=none,ts_nocheck=false"
// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3)
/* eslint-disable */

Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic/src/gen/eliza-Slouch_connectquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-connect-query v1.1.3 with parameter "target=ts,import_extension=none,ts_nocheck=false"
// @generated by protoc-gen-connect-query v1.2.0 with parameter "target=ts,import_extension=none,ts_nocheck=false"
// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3)
/* eslint-disable */

Expand Down
2 changes: 1 addition & 1 deletion packages/connect-query/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@connectrpc/connect-query",
"version": "1.1.3",
"version": "1.2.0",
"description": "TypeScript-first expansion pack for TanStack Query that gives you Protobuf superpowers.",
"license": "Apache-2.0",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/protoc-gen-connect-query/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@connectrpc/protoc-gen-connect-query",
"version": "1.1.3",
"version": "1.2.0",
"description": "Code generator for connect-query",
"license": "Apache-2.0",
"sideEffects": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-connect-query v1.1.3 with parameter "js_import_style=legacy_commonjs,ts_nocheck=false"
// @generated by protoc-gen-connect-query v1.2.0 with parameter "js_import_style=legacy_commonjs,ts_nocheck=false"
// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3)
/* eslint-disable */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-connect-query v1.1.3 with parameter "js_import_style=legacy_commonjs,ts_nocheck=false"
// @generated by protoc-gen-connect-query v1.2.0 with parameter "js_import_style=legacy_commonjs,ts_nocheck=false"
// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3)
/* eslint-disable */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-connect-query v1.1.3
// @generated by protoc-gen-connect-query v1.2.0
// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-connect-query v1.1.3
// @generated by protoc-gen-connect-query v1.2.0
// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-connect-query v1.1.3 with parameter "target=ts,ts_nocheck=false"
// @generated by protoc-gen-connect-query v1.2.0 with parameter "target=ts,ts_nocheck=false"
// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3)
/* eslint-disable */

Expand Down

0 comments on commit c7e0c66

Please sign in to comment.