Skip to content

Commit

Permalink
Publish packages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed May 30, 2024
1 parent 442f69a commit 2130cb3
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 46 deletions.
6 changes: 0 additions & 6 deletions .changeset/clean-deers-shop.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/cyan-lizards-thank.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/eighty-baboons-double.md

This file was deleted.

8 changes: 8 additions & 0 deletions packages/async/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @quilted/async

## 0.4.14

### Patch Changes

- [`442f69a`](https://github.com/lemonmade/quilt/commit/442f69a701897aeef40cb1eb2460b0551e4586c9) Thanks [@lemonmade](https://github.com/lemonmade)! - Add a count of active query watchers

- [`1d1e03a`](https://github.com/lemonmade/quilt/commit/1d1e03a07955a2312a29398382f66db87577fb6e) Thanks [@lemonmade](https://github.com/lemonmade)! - Improve `AsyncAction.run()` retry semantics, and add `force` option for forcibly re-running an action

## 0.4.13

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/async/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@quilted/async",
"type": "module",
"version": "0.4.13",
"version": "0.4.14",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
57 changes: 32 additions & 25 deletions packages/graphql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @quilted/graphql

## 3.1.3

### Patch Changes

- Updated dependencies [[`442f69a`](https://github.com/lemonmade/quilt/commit/442f69a701897aeef40cb1eb2460b0551e4586c9), [`1d1e03a`](https://github.com/lemonmade/quilt/commit/1d1e03a07955a2312a29398382f66db87577fb6e)]:
- @quilted/async@0.4.14

## 3.1.2

### Patch Changes
Expand Down Expand Up @@ -85,14 +92,14 @@
import {
createGraphQLHttpFetch,
type GraphQLHttpFetchOptions,
} from '@quilted/graphql';
} from "@quilted/graphql";

// becomes:

import {
createGraphQLFetchOverHTTP,
type GraphQLFetchOverHTTPOptions,
} from '@quilted/graphql';
} from "@quilted/graphql";
```

This change is being made as part of a larger effort to use uppercase letters for acronyms and initialisms.
Expand Down Expand Up @@ -199,88 +206,88 @@
```ts
// This all applies for createGraphQLHttpStreamingFetch, too
import {createGraphQLHttpFetch} from '@quilted/graphql';
import { createGraphQLHttpFetch } from "@quilted/graphql";

// Importing `.graphql` files automatically generates hashed
// identifiers for your operations. If you don’t use this feature,
// you must pass the identifier yourself.
import myQuery from './MyQuery.graphql';
import myQuery from "./MyQuery.graphql";

const fetch = createGraphQLHttpFetch({
source: false,
url: 'https://my-app.com/query',
url: "https://my-app.com/query",
});

const {data} = await fetch(myQuery);
const { data } = await fetch(myQuery);
```
This isn’t typically useful unless you also communicate the operation’s hash identifier. Here’s an example showing how you could pass the identifier as an additional URL parameter:
```ts
import {createGraphQLHttpFetch} from '@quilted/graphql';
import myQuery from './MyQuery.graphql';
import { createGraphQLHttpFetch } from "@quilted/graphql";
import myQuery from "./MyQuery.graphql";

const fetch = createGraphQLHttpFetch({
source: false,
url(operation) {
const url = new URL('https://my-app.com/query');
url.searchParams.set('id', operation.id);
const url = new URL("https://my-app.com/query");
url.searchParams.set("id", operation.id);
return url;
},
});

const {data} = await fetch(myQuery);
const { data } = await fetch(myQuery);
```
Here’s an alternative approach, which sends the operation using a GraphQL `extensions` field, according to Apollo’s [automatic persisted queries protocol](https://www.google.com/search?client=safari&rls=en&q=apollo+autoamtic+persisted+queries&ie=UTF-8&oe=UTF-8):
```ts
import {createGraphQLHttpFetch} from '@quilted/graphql';
import myQuery from './MyQuery.graphql';
import { createGraphQLHttpFetch } from "@quilted/graphql";
import myQuery from "./MyQuery.graphql";

const fetch = createGraphQLHttpFetch({
source: false,
url: 'https://my-app.com/query',
url: "https://my-app.com/query",
extensions(operation) {
return {
persistedQuery: {version: 1, sha256Hash: operation.id},
persistedQuery: { version: 1, sha256Hash: operation.id },
};
},
});

const {data} = await fetch(myQuery);
const { data } = await fetch(myQuery);
```
These `source` and `extension` options can be set globally, as shown above, or per-fetch:
```ts
import {createGraphQLHttpFetch} from '@quilted/graphql';
import myQuery from './MyQuery.graphql';
import { createGraphQLHttpFetch } from "@quilted/graphql";
import myQuery from "./MyQuery.graphql";

const fetch = createGraphQLHttpFetch({
url: 'https://my-app.com/query',
url: "https://my-app.com/query",
});

const {data} = await fetch(myQuery, {
const { data } = await fetch(myQuery, {
source: false,
extensions: {
persistedQuery: {version: 1, sha256Hash: myQuery.id},
persistedQuery: { version: 1, sha256Hash: myQuery.id },
},
});
```
You can also now set the `method`, `url`, and `headers` options per fetch. The example below shows how you can set the `method` to `GET` for a single GraphQL operation:
```ts
import {createGraphQLHttpFetch} from '@quilted/graphql';
import { createGraphQLHttpFetch } from "@quilted/graphql";

const fetch = createGraphQLHttpFetch({
url: 'https://my-app.com/query',
url: "https://my-app.com/query",
});

const {data} = await fetch(`{ me { name } }`, {
const { data } = await fetch(`{ me { name } }`, {
// Default is POST, but this query will run as a GET
method: 'GET',
method: "GET",
});
```
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@quilted/graphql",
"description": "Tiny, type-safe helpers for using GraphQL",
"type": "module",
"version": "3.1.2",
"version": "3.1.3",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
11 changes: 11 additions & 0 deletions packages/preact-async/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @quilted/preact-async

## 0.1.13

### Patch Changes

- [`442f69a`](https://github.com/lemonmade/quilt/commit/442f69a701897aeef40cb1eb2460b0551e4586c9) Thanks [@lemonmade](https://github.com/lemonmade)! - Add a count of active query watchers

- [`d58b911`](https://github.com/lemonmade/quilt/commit/d58b911dbe0fecccb46cfbbb152a874d114d2b16) Thanks [@lemonmade](https://github.com/lemonmade)! - Add `useAsyncCacheControl()` hook to revalidate async actions

- Updated dependencies [[`442f69a`](https://github.com/lemonmade/quilt/commit/442f69a701897aeef40cb1eb2460b0551e4586c9), [`1d1e03a`](https://github.com/lemonmade/quilt/commit/1d1e03a07955a2312a29398382f66db87577fb6e)]:
- @quilted/async@0.4.14

## 0.1.12

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/preact-async/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@quilted/preact-async",
"type": "module",
"version": "0.1.12",
"version": "0.1.13",
"repository": {
"type": "git",
"url": "https://github.com/lemonmade/quilt.git",
Expand All @@ -26,7 +26,7 @@
"build": "rollup --config configuration/rollup.config.js"
},
"dependencies": {
"@quilted/async": "workspace:^0.4.13",
"@quilted/async": "workspace:^0.4.14",
"@quilted/preact-browser": "workspace:^0.1.4",
"@quilted/preact-context": "workspace:^0.1.0",
"@quilted/preact-signals": "workspace:^0.1.0"
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2130cb3

Please sign in to comment.