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 5, 2024
1 parent 6b96d6d commit 39a0f60
Show file tree
Hide file tree
Showing 29 changed files with 202 additions and 115 deletions.
5 changes: 0 additions & 5 deletions .changeset/nice-rings-whisper.md

This file was deleted.

16 changes: 0 additions & 16 deletions .changeset/silver-bananas-compare.md

This file was deleted.

2 changes: 1 addition & 1 deletion integrations/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"peerDependencies": {
"@quilted/craft": "workspace:^0.2.6",
"@quilted/quilt": "workspace:^0.6.14"
"@quilted/quilt": "workspace:^0.6.15"
},
"peerDependenciesMeta": {
"@quilted/craft": {
Expand Down
2 changes: 1 addition & 1 deletion integrations/deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
},
"peerDependencies": {
"@quilted/craft": "workspace:^0.2.6",
"@quilted/quilt": "workspace:^0.6.14"
"@quilted/quilt": "workspace:^0.6.15"
},
"peerDependenciesMeta": {
"@quilted/craft": {
Expand Down
9 changes: 9 additions & 0 deletions integrations/react-query/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @quilted/react-query

## 0.3.2

### Patch Changes

- [#716](https://github.com/lemonmade/quilt/pull/716) [`7daafca`](https://github.com/lemonmade/quilt/commit/7daafca900b3d9ea66be179394eadf7998cc94be) Thanks [@lemonmade](https://github.com/lemonmade)! - Refactor browser APIs

- Updated dependencies [[`7daafca`](https://github.com/lemonmade/quilt/commit/7daafca900b3d9ea66be179394eadf7998cc94be)]:
- @quilted/quilt@0.6.15

## 0.3.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions integrations/react-query/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@quilted/react-query",
"type": "module",
"version": "0.3.1",
"version": "0.3.2",
"license": "MIT",
"repository": {
"type": "git",
Expand Down Expand Up @@ -29,7 +29,7 @@
"@quilted/useful-types": "workspace:^2.0.0"
},
"peerDependencies": {
"@quilted/quilt": "workspace:^0.6.14",
"@quilted/quilt": "workspace:^0.6.15",
"react": "^17.0.0 || ^18.0.0",
"@tanstack/react-query": "^5.0.0"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/assets/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @quilted/assets

## 0.1.2

### Patch Changes

- [#716](https://github.com/lemonmade/quilt/pull/716) [`7daafca`](https://github.com/lemonmade/quilt/commit/7daafca900b3d9ea66be179394eadf7998cc94be) Thanks [@lemonmade](https://github.com/lemonmade)! - Refactor browser APIs

## 0.1.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"access": "public",
"@quilted/registry": "https://registry.npmjs.org"
},
"version": "0.1.1",
"version": "0.1.2",
"engines": {
"node": ">=14.0.0"
},
Expand Down
10 changes: 10 additions & 0 deletions packages/browser/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# @quilted/browser

## 0.0.1

### Patch Changes

- [#716](https://github.com/lemonmade/quilt/pull/716) [`7daafca`](https://github.com/lemonmade/quilt/commit/7daafca900b3d9ea66be179394eadf7998cc94be) Thanks [@lemonmade](https://github.com/lemonmade)! - Refactor browser APIs

- Updated dependencies [[`7daafca`](https://github.com/lemonmade/quilt/commit/7daafca900b3d9ea66be179394eadf7998cc94be)]:
- @quilted/assets@0.1.2
4 changes: 2 additions & 2 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"access": "public",
"@quilted/registry": "https://registry.npmjs.org"
},
"version": "0.0.0",
"version": "0.0.1",
"engines": {
"node": ">=18.0.0"
},
Expand Down Expand Up @@ -51,7 +51,7 @@
"build": "rollup --config ./rollup.config.js"
},
"dependencies": {
"@quilted/assets": "workspace:^0.1.1",
"@quilted/assets": "workspace:^0.1.2",
"@quilted/signals": "workspace:^0.2.1",
"js-cookie": "^3.0.0"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/create/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @quilted/create

## 0.2.19

### Patch Changes

- [#716](https://github.com/lemonmade/quilt/pull/716) [`7daafca`](https://github.com/lemonmade/quilt/commit/7daafca900b3d9ea66be179394eadf7998cc94be) Thanks [@lemonmade](https://github.com/lemonmade)! - Refactor browser APIs

## 0.2.18

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/create/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@quilted/create",
"type": "module",
"version": "0.2.18",
"version": "0.2.19",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
56 changes: 31 additions & 25 deletions packages/graphql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @quilted/graphql

## 3.0.3

### Patch Changes

- [#716](https://github.com/lemonmade/quilt/pull/716) [`7daafca`](https://github.com/lemonmade/quilt/commit/7daafca900b3d9ea66be179394eadf7998cc94be) Thanks [@lemonmade](https://github.com/lemonmade)! - Refactor browser APIs

## 3.0.2

### Patch Changes
Expand Down Expand Up @@ -46,14 +52,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 @@ -160,88 +166,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.0.2",
"version": "3.0.3",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit 39a0f60

Please sign in to comment.