Skip to content

Commit cb59ef4

Browse files
authored
Merge branch 'master' into formatting
2 parents b05cfc8 + 81b20f5 commit cb59ef4

File tree

112 files changed

+2032
-1821
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+2032
-1821
lines changed

.changeset/witty-tables-join.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-codegen/fragment-matcher': minor
3+
---
4+
5+
Add new flag to make the fragment matcher results deterministic

.github/workflows/main.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,31 @@ jobs:
5656
yarn run generate:examples:${{matrix.method}}
5757
git diff --exit-code -- dev-test/
5858
dev-tests:
59-
name: Examples
59+
name: Examples - Normal
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Checkout
63+
uses: actions/checkout@v4
64+
- name: Setup env
65+
uses: the-guild-org/shared-config/setup@main
66+
with:
67+
nodeVersion: 18
68+
- name: Build
69+
run: yarn build
70+
env:
71+
CI: true
72+
- name: Generate and Diff Codegen Artifacts
73+
run: |
74+
EXAMPLE_TYPE=normal yarn examples:codegen
75+
git diff --exit-code -- examples/
76+
- name: Build Examples
77+
run: |
78+
EXAMPLE_TYPE=normal yarn examples:build
79+
- name: End2End Test Examples
80+
run: |
81+
EXAMPLE_TYPE=normal yarn examples:test:end2end
82+
dev-tests-swc:
83+
name: Examples - SWC
6084
runs-on: ubuntu-latest
6185
steps:
6286
- name: Checkout
@@ -80,14 +104,14 @@ jobs:
80104
CI: true
81105
- name: Generate and Diff Codegen Artifacts
82106
run: |
83-
yarn examples:codegen
107+
EXAMPLE_TYPE=swc yarn examples:codegen
84108
git diff --exit-code -- examples/
85109
- name: Build Examples
86110
run: |
87-
yarn examples:build
111+
EXAMPLE_TYPE=swc yarn examples:build
88112
- name: End2End Test Examples
89113
run: |
90-
yarn examples:test:end2end
114+
EXAMPLE_TYPE=swc yarn examples:test:end2end
91115
esm:
92116
name: Testing exports integrity
93117
runs-on: ubuntu-latest

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20
1+
22

dev-test/gql-tag-operations-masking/gql/gql.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
1313
* Therefore it is highly recommended to use the babel or swc plugin for production.
1414
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
1515
*/
16-
const documents = {
16+
type Documents = {
17+
'\n fragment TweetFragment on Tweet {\n id\n body\n ...TweetAuthorFragment\n }\n': typeof types.TweetFragmentFragmentDoc;
18+
'\n fragment TweetAuthorFragment on Tweet {\n id\n author {\n id\n username\n }\n }\n': typeof types.TweetAuthorFragmentFragmentDoc;
19+
'\n fragment TweetsFragment on Query {\n Tweets {\n id\n ...TweetFragment\n }\n }\n': typeof types.TweetsFragmentFragmentDoc;
20+
'\n query TweetAppQuery {\n ...TweetsFragment\n }\n': typeof types.TweetAppQueryDocument;
21+
};
22+
const documents: Documents = {
1723
'\n fragment TweetFragment on Tweet {\n id\n body\n ...TweetAuthorFragment\n }\n':
1824
types.TweetFragmentFragmentDoc,
1925
'\n fragment TweetAuthorFragment on Tweet {\n id\n author {\n id\n username\n }\n }\n':

dev-test/gql-tag-operations-urql/gql/gql.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
1313
* Therefore it is highly recommended to use the babel or swc plugin for production.
1414
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
1515
*/
16-
const documents = {
16+
type Documents = {
17+
'\n query Foo {\n Tweets {\n id\n }\n }\n': typeof types.FooDocument;
18+
'\n fragment Lel on Tweet {\n id\n body\n }\n': typeof types.LelFragmentDoc;
19+
'\n query Bar {\n Tweets {\n ...Lel\n }\n }\n': typeof types.BarDocument;
20+
};
21+
const documents: Documents = {
1722
'\n query Foo {\n Tweets {\n id\n }\n }\n': types.FooDocument,
1823
'\n fragment Lel on Tweet {\n id\n body\n }\n': types.LelFragmentDoc,
1924
'\n query Bar {\n Tweets {\n ...Lel\n }\n }\n': types.BarDocument,

dev-test/gql-tag-operations/gql/gql.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
1313
* Therefore it is highly recommended to use the babel or swc plugin for production.
1414
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
1515
*/
16-
const documents = {
16+
type Documents = {
17+
'\n query Foo {\n Tweets {\n id\n }\n }\n': typeof types.FooDocument;
18+
'\n fragment Lel on Tweet {\n id\n body\n }\n': typeof types.LelFragmentDoc;
19+
'\n query Bar {\n Tweets {\n ...Lel\n }\n }\n': typeof types.BarDocument;
20+
};
21+
const documents: Documents = {
1722
'\n query Foo {\n Tweets {\n id\n }\n }\n': types.FooDocument,
1823
'\n fragment Lel on Tweet {\n id\n body\n }\n': types.LelFragmentDoc,
1924
'\n query Bar {\n Tweets {\n ...Lel\n }\n }\n': types.BarDocument,

dev-test/gql-tag-operations/graphql/gql.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
1313
* Therefore it is highly recommended to use the babel or swc plugin for production.
1414
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
1515
*/
16-
const documents = {
16+
type Documents = {
17+
'\n query Foo {\n Tweets {\n id\n }\n }\n': typeof types.FooDocument;
18+
'\n fragment Lel on Tweet {\n id\n body\n }\n': typeof types.LelFragmentDoc;
19+
'\n query Bar {\n Tweets {\n ...Lel\n }\n }\n': typeof types.BarDocument;
20+
};
21+
const documents: Documents = {
1722
'\n query Foo {\n Tweets {\n id\n }\n }\n': types.FooDocument,
1823
'\n fragment Lel on Tweet {\n id\n body\n }\n': types.LelFragmentDoc,
1924
'\n query Bar {\n Tweets {\n ...Lel\n }\n }\n': types.BarDocument,

examples/persisted-documents-string-mode/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"@graphql-typed-document-node/core": "3.2.0",
1111
"jest": "28.1.3",
1212
"babel-jest": "29.7.0",
13-
"@graphql-codegen/cli": "5.0.3",
13+
"@graphql-codegen/cli": "5.0.4",
1414
"@babel/core": "7.25.2",
1515
"@babel/preset-env": "7.25.3",
16-
"@babel/preset-typescript": "7.24.7"
16+
"@babel/preset-typescript": "7.26.0"
1717
},
1818
"scripts": {
1919
"test": "jest",

examples/persisted-documents-string-mode/src/gql/gql.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ import * as types from './graphql';
1212
* Therefore it is highly recommended to use the babel or swc plugin for production.
1313
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
1414
*/
15-
const documents = {
15+
type Documents = {
16+
'\n query HelloQuery {\n hello\n }\n': typeof types.HelloQueryDocument;
17+
};
18+
const documents: Documents = {
1619
'\n query HelloQuery {\n hello\n }\n': types.HelloQueryDocument,
1720
};
1821

examples/persisted-documents/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"@graphql-typed-document-node/core": "3.2.0",
1111
"jest": "28.1.3",
1212
"babel-jest": "29.7.0",
13-
"@graphql-codegen/cli": "5.0.3",
13+
"@graphql-codegen/cli": "5.0.4",
1414
"@babel/core": "7.25.2",
1515
"@babel/preset-env": "7.25.3",
16-
"@babel/preset-typescript": "7.24.7"
16+
"@babel/preset-typescript": "7.26.0"
1717
},
1818
"scripts": {
1919
"test": "jest",

0 commit comments

Comments
 (0)