Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: graphprotocol/graph-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @graphprotocol/[email protected]
Choose a base ref
...
head repository: graphprotocol/graph-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 12,909 additions and 7,158 deletions.
  1. +5 −0 .changeset/@graphprotocol_client-add-source-name-843-dependencies.md
  2. +5 −0 .changeset/@graphprotocol_client-apollo-809-dependencies.md
  3. +5 −0 .changeset/@graphprotocol_client-apollo-843-dependencies.md
  4. +5 −0 .changeset/@graphprotocol_client-auto-pagination-843-dependencies.md
  5. +6 −0 .changeset/@graphprotocol_client-auto-type-merging-843-dependencies.md
  6. +5 −0 .changeset/@graphprotocol_client-block-tracking-809-dependencies.md
  7. +5 −0 .changeset/@graphprotocol_client-cli-806-dependencies.md
  8. +5 −0 .changeset/@graphprotocol_client-cli-809-dependencies.md
  9. +6 −0 .changeset/@graphprotocol_client-cli-843-dependencies.md
  10. +5 −0 .changeset/@graphprotocol_client-urql-809-dependencies.md
  11. +5 −0 .changeset/@graphprotocol_client-urql-843-dependencies.md
  12. +25 −4 .changeset/config.json
  13. +23 −14 .github/workflows/ci.yml
  14. +35 −0 .github/workflows/pr.yml
  15. +9 −41 .github/workflows/release.yml
  16. +3 −0 .gitignore
  17. +1 −1 .vscode/settings.json
  18. +0 −382 README.md
  19. +1 −4 babel.config.js
  20. +0 −1 bob.config.js
  21. +611 −0 docs/README.md
  22. +51 −29 docs/architecture.md
  23. +43 −0 docs/live.md
  24. +1 −9 examples/apollo/index.html
  25. +11 −12 examples/apollo/package.json
  26. +2 −2 examples/apollo/src/main.tsx
  27. +0 −6 examples/apollo/vite.config.ts
  28. +16 −0 examples/auto-pagination-multiple-sources/.graphclientrc.yml
  29. +22 −0 examples/auto-pagination-multiple-sources/package.json
  30. +5 −0 examples/auto-pagination-multiple-sources/queries/openAllocation.graphql
  31. +20 −0 examples/auto-pagination-multiple-sources/src/index.ts
  32. +12 −0 examples/auto-pagination-multiple-sources/tsconfig.json
  33. +3 −25 examples/composition/.graphclientrc.yml
  34. +1 −1 examples/composition/README.md
  35. +9 −11 examples/composition/package.json
  36. +21 −23 examples/composition/src/index.ts
  37. +1 −0 examples/cross-chain-extension/.gitignore
  38. +24 −0 examples/cross-chain-extension/.graphclientrc.yml
  39. +54 −0 examples/cross-chain-extension/README.md
  40. +8 −0 examples/cross-chain-extension/example-query.graphql
  41. +16 −0 examples/cross-chain-extension/package.json
  42. +17 −0 examples/cross-chain-extension/src/index.ts
  43. +30 −0 examples/cross-chain-extension/src/resolvers.ts
  44. +12 −0 examples/cross-chain-extension/tsconfig.json
  45. +1 −0 examples/cross-chain-sdk/.gitignore
  46. +21 −0 examples/cross-chain-sdk/.graphclientrc.yml
  47. +54 −0 examples/cross-chain-sdk/README.md
  48. +8 −0 examples/cross-chain-sdk/example-query.graphql
  49. +16 −0 examples/cross-chain-sdk/package.json
  50. +26 −0 examples/cross-chain-sdk/src/index.ts
  51. +7 −0 examples/cross-chain-sdk/src/resolvers.ts
  52. +12 −0 examples/cross-chain-sdk/tsconfig.json
  53. +1 −9 examples/execute/index.html
  54. +9 −10 examples/execute/package.json
  55. +4 −8 examples/execute/src/App.tsx
  56. +0 −6 examples/execute/vite.config.ts
  57. +1 −0 examples/javascript-cjs/.gitignore
  58. +12 −0 examples/javascript-cjs/.graphclientrc.yml
  59. +8 −0 examples/javascript-cjs/CHANGELOG.md
  60. +22 −0 examples/javascript-cjs/example-query.graphql
  61. +35 −0 examples/javascript-cjs/index.js
  62. +16 −0 examples/javascript-cjs/package.json
  63. +7 −0 examples/javascript-cjs/sandbox.config.json
  64. +1 −0 examples/javascript-esm/.gitignore
  65. +12 −0 examples/javascript-esm/.graphclientrc.yml
  66. +8 −0 examples/javascript-esm/CHANGELOG.md
  67. +22 −0 examples/javascript-esm/example-query.graphql
  68. +35 −0 examples/javascript-esm/index.js
  69. +16 −0 examples/javascript-esm/package.json
  70. +12 −0 examples/live-queries/.graphclientrc.yml
  71. +7 −0 examples/live-queries/example-query.graphql
  72. +15 −0 examples/live-queries/package.json
  73. +10 −10 examples/nextjs/package.json
  74. +1 −1 examples/nextjs/pages/index.tsx
  75. +11 −2 examples/nextjs/styles/Home.module.css
  76. +12 −2 examples/nextjs/styles/globals.css
  77. +8 −8 examples/node/package.json
  78. +1 −3 examples/node/src/index.ts
  79. +25 −0 examples/react-query/.gitignore
  80. +12 −0 examples/react-query/.graphclientrc.yml
  81. +11 −0 examples/react-query/CHANGELOG.md
  82. +28 −0 examples/react-query/README.md
  83. +13 −0 examples/react-query/index.html
  84. +26 −0 examples/react-query/package.json
  85. +50 −0 examples/react-query/src/App.css
  86. +44 −0 examples/react-query/src/App.tsx
  87. +22 −0 examples/react-query/src/example-query.graphql
  88. +15 −0 examples/react-query/src/favicon.svg
  89. +11 −0 examples/react-query/src/index.css
  90. +1 −0 examples/react-query/src/logo.svg
  91. +17 −0 examples/react-query/src/main.tsx
  92. +1 −0 examples/react-query/src/vite-env.d.ts
  93. +21 −0 examples/react-query/tsconfig.json
  94. +8 −0 examples/react-query/tsconfig.node.json
  95. +7 −0 examples/react-query/vite.config.ts
  96. +1 −0 examples/transforms/.gitignore
  97. +17 −0 examples/transforms/.graphclientrc.yml
  98. +35 −0 examples/transforms/CHANGELOG.md
  99. +56 −0 examples/transforms/README.md
  100. +14 −0 examples/transforms/package.json
  101. +25 −0 examples/urql-live-query/.gitignore
  102. +12 −0 examples/urql-live-query/.graphclientrc.yml
  103. +22 −0 examples/urql-live-query/README.md
  104. +13 −0 examples/urql-live-query/index.html
  105. +27 −0 examples/urql-live-query/package.json
  106. +50 −0 examples/urql-live-query/src/App.css
  107. +44 −0 examples/urql-live-query/src/App.tsx
  108. +7 −0 examples/urql-live-query/src/example-query.graphql
  109. +15 −0 examples/urql-live-query/src/favicon.svg
  110. +11 −0 examples/urql-live-query/src/index.css
  111. +1 −0 examples/urql-live-query/src/logo.svg
  112. +22 −0 examples/urql-live-query/src/main.tsx
  113. +1 −0 examples/urql-live-query/src/vite-env.d.ts
  114. +21 −0 examples/urql-live-query/tsconfig.json
  115. +8 −0 examples/urql-live-query/tsconfig.node.json
  116. +7 −0 examples/urql-live-query/vite.config.ts
  117. +1 −9 examples/urql/index.html
  118. +11 −12 examples/urql/package.json
  119. +2 −2 examples/urql/src/main.tsx
  120. +0 −6 examples/urql/vite.config.ts
  121. +15 −3 jest.config.js
  122. +28 −26 package.json
  123. +321 −0 packages/add-source-name/CHANGELOG.md
  124. +48 −0 packages/add-source-name/__tests__/add-source-name.test.ts
  125. +66 −0 packages/add-source-name/package.json
  126. +24 −0 packages/add-source-name/src/index.ts
  127. +239 −0 packages/apollo/CHANGELOG.md
  128. +28 −14 packages/apollo/package.json
  129. +390 −0 packages/auto-pagination/CHANGELOG.md
  130. +22 −0 packages/auto-pagination/README.md
  131. +370 −0 packages/auto-pagination/__tests__/auto-pagination.test.ts
  132. +67 −0 packages/auto-pagination/package.json
  133. +274 −0 packages/auto-pagination/src/index.ts
  134. +394 −0 packages/auto-type-merging/CHANGELOG.md
  135. +61 −0 packages/auto-type-merging/package.json
  136. +32 −0 packages/auto-type-merging/src/index.ts
  137. +247 −0 packages/block-tracking/CHANGELOG.md
  138. +19 −0 packages/block-tracking/README.md
  139. +584 −0 packages/block-tracking/__tests__/block-tracking.test.ts
  140. +61 −0 packages/block-tracking/package.json
  141. +2 −0 packages/block-tracking/src/index.ts
  142. +41 −0 packages/block-tracking/src/plugin.ts
  143. +178 −0 packages/block-tracking/src/shared.ts
  144. +132 −0 packages/block-tracking/src/transform.ts
  145. +729 −0 packages/cli/CHANGELOG.md
  146. +32 −23 packages/cli/package.json
  147. +1 −0 packages/cli/src/bin.ts
  148. +1 −0 packages/cli/src/index.ts
  149. +61 −0 packages/polling-live/CHANGELOG.md
  150. +61 −0 packages/polling-live/package.json
  151. +105 −0 packages/polling-live/src/index.ts
  152. +148 −0 packages/polling-live/test/polling-live.test.ts
  153. +245 −0 packages/urql/CHANGELOG.md
  154. +26 −15 packages/urql/package.json
  155. +25 −6 renovate.json
  156. +1 −1 scripts/fix-bin.js
  157. +0 −15 tsconfig.build.json
  158. +1 −2 tsconfig.json
  159. +5,520 −6,400 yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphprotocol/client-add-source-name': patch
---
dependencies updates:
- Updated dependency [`@graphql-mesh/types@^0.78.0 || ^0.79.0 || ^0.80.0 || ^0.81.0 || ^0.82.0 || ^0.83.0 || ^0.84.0 || ^0.85.0 || ^0.89.0 || ^0.90.0 || ^0.91.0 || ^0.93.0 || ^0.94.0 || ^0.97.0 || ^0.98.0 || ^0.99.0 || ^0.100.0 || ^0.101.0 || ^0.102.0 || ^0.103.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/types/v/0.78.0) (from `^0.78.0 || ^0.79.0 || ^0.80.0 || ^0.81.0 || ^0.82.0 || ^0.83.0 || ^0.84.0 || ^0.85.0 || ^0.89.0 || ^0.90.0 || ^0.91.0 || ^0.93.0 || ^0.94.0 || ^0.97.0 || ^0.98.0 || ^0.99.0 || ^0.100.0 || ^0.101.0 || ^0.102.0`, in `peerDependencies`)
5 changes: 5 additions & 0 deletions .changeset/@graphprotocol_client-apollo-809-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphprotocol/client-apollo': patch
---
dependencies updates:
- Updated dependency [`@graphql-mesh/apollo-link@^0.104.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/apollo-link/v/0.104.0) (from `^0.103.0`, in `dependencies`)
5 changes: 5 additions & 0 deletions .changeset/@graphprotocol_client-apollo-843-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphprotocol/client-apollo': patch
---
dependencies updates:
- Updated dependency [`@graphql-mesh/apollo-link@^0.105.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/apollo-link/v/0.105.0) (from `^0.104.0`, in `dependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphprotocol/client-auto-pagination': patch
---
dependencies updates:
- Updated dependency [`@graphql-mesh/types@^0.78.0 || ^0.79.0 || ^0.80.0 || ^0.81.0 || ^0.82.0 || ^0.83.0 || ^0.84.0 || ^0.85.0 || ^0.89.0 || ^0.90.0 || ^0.91.0 || ^0.93.0 || ^0.94.0 || ^0.97.0 || ^0.98.0 || ^0.99.0 || ^0.100.0 || ^0.101.0 || ^0.102.0 || ^0.103.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/types/v/0.78.0) (from `^0.78.0 || ^0.79.0 || ^0.80.0 || ^0.81.0 || ^0.82.0 || ^0.83.0 || ^0.84.0 || ^0.85.0 || ^0.89.0 || ^0.90.0 || ^0.91.0 || ^0.93.0 || ^0.94.0 || ^0.97.0 || ^0.98.0 || ^0.99.0 || ^0.100.0 || ^0.101.0 || ^0.102.0`, in `peerDependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphprotocol/client-auto-type-merging': patch
---
dependencies updates:
- Updated dependency [`@graphql-mesh/transform-type-merging@^0.103.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/transform-type-merging/v/0.103.0) (from `^0.102.0`, in `dependencies`)
- Updated dependency [`@graphql-mesh/types@^0.78.0 || ^0.79.0 || ^0.80.0 || ^0.81.0 || ^0.82.0 || ^0.83.0 || ^0.84.0 || ^0.85.0 || ^0.89.0 || ^0.90.0 || ^0.91.0 || ^0.93.0 || ^0.94.0 || ^0.97.0 || ^0.98.0 || ^0.99.0 || ^0.100.0 || ^0.101.0 || ^0.102.0 || ^0.103.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/types/v/0.78.0) (from `^0.78.0 || ^0.79.0 || ^0.80.0 || ^0.81.0 || ^0.82.0 || ^0.83.0 || ^0.84.0 || ^0.85.0 || ^0.89.0 || ^0.90.0 || ^0.91.0 || ^0.93.0 || ^0.94.0 || ^0.97.0 || ^0.98.0 || ^0.99.0 || ^0.100.0 || ^0.101.0 || ^0.102.0`, in `peerDependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphprotocol/client-block-tracking': patch
---
dependencies updates:
- Updated dependency [`@graphql-mesh/fusion-runtime@^0.10.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/fusion-runtime/v/0.10.0) (from `^0.8.0`, in `dependencies`)
5 changes: 5 additions & 0 deletions .changeset/@graphprotocol_client-cli-806-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphprotocol/client-cli': patch
---
dependencies updates:
- Updated dependency [`@graphql-mesh/cli@^0.96.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/cli/v/0.96.0) (from `^0.95.0`, in `dependencies`)
5 changes: 5 additions & 0 deletions .changeset/@graphprotocol_client-cli-809-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphprotocol/client-cli': patch
---
dependencies updates:
- Updated dependency [`@graphql-mesh/cli@^0.97.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/cli/v/0.97.0) (from `^0.96.0`, in `dependencies`)
6 changes: 6 additions & 0 deletions .changeset/@graphprotocol_client-cli-843-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphprotocol/client-cli': patch
---
dependencies updates:
- Updated dependency [`@graphql-mesh/cli@^0.98.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/cli/v/0.98.0) (from `^0.97.0`, in `dependencies`)
- Updated dependency [`@graphql-mesh/graphql@^0.103.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/graphql/v/0.103.0) (from `^0.102.0`, in `dependencies`)
5 changes: 5 additions & 0 deletions .changeset/@graphprotocol_client-urql-809-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphprotocol/client-urql': patch
---
dependencies updates:
- Updated dependency [`@graphql-mesh/urql-exchange@^0.104.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/urql-exchange/v/0.104.0) (from `^0.103.0`, in `dependencies`)
5 changes: 5 additions & 0 deletions .changeset/@graphprotocol_client-urql-843-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphprotocol/client-urql': patch
---
dependencies updates:
- Updated dependency [`@graphql-mesh/urql-exchange@^0.105.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/urql-exchange/v/0.105.0) (from `^0.104.0`, in `dependencies`)
29 changes: 25 additions & 4 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.7.0/schema.json",
"changelog": "@changesets/cli/changelog",
"$schema": "https://unpkg.com/@changesets/config@2.1.0/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "graphprotocol/graph-client" }],
"commit": false,
"linked": [],
"ignore": ["apollo-example", "composition-example", "node-example", "urql-example"],
"ignore": [
"apollo-example",
"composition-example",
"node-example",
"urql-example",
"execute-example",
"transforms-example",
"javascript-esm-example",
"javascript-cjs-example",
"react-query-example",
"nextjs-example",
"cross-chain-sdk",
"cross-chain-extension",
"live-queries-example",
"urql-live-example",
"*-example"
],
"access": "public",
"baseBranch": "main"
"baseBranch": "main",
"updateInternalDependencies": "patch",
"snapshot": {
"useCalculatedVersion": true,
"prereleaseTemplate": "{tag}-{datetime}-{commit}"
}
}
37 changes: 23 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
name: Tests
name: test
on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
test-node:
name: Testing on Node ${{ matrix.node-version }}
node:
name: node v${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16]
node-version: [18, 20, 22]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@master
- uses: the-guild-org/shared-config/setup@main
name: setup env
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache
uses: c-hive/gha-yarn-cache@v2

- name: Install Dependencies using Yarn
run: yarn
nodeVersion: ${{ matrix.node-version }}

- name: Build Packages
run: yarn build

- name: Test
run: yarn test

- name: Node.js integrity check
run: yarn bob check

# - name: Test example ESM Build
# run: yarn workspace javascript-esm-example run build-client

# - name: Test example CJS Build
# run: yarn workspace javascript-cjs-example run build-client
35 changes: 35 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: pr
on:
pull_request:
branches:
- main

jobs:
dependencies:
uses: the-guild-org/shared-config/.github/workflows/changesets-dependencies.yaml@main
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}

alpha:
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
with:
npmTag: alpha
buildScript: build
nodeVersion: 22
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
npmToken: ${{ secrets.NPM_TOKEN }}

release-candidate:
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main
if: ${{ github.event.pull_request.title == 'Upcoming Release Changes' }}
with:
npmTag: rc
buildScript: build
nodeVersion: 22
restoreDeletedChangesets: true
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
npmToken: ${{ secrets.NPM_TOKEN }}
50 changes: 9 additions & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,15 @@
name: Release

name: release
on:
push:
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Use Node
uses: actions/setup-node@master
with:
node-version: 16.x

- name: Setup NPM credentials
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Get yarn cache
uses: c-hive/gha-yarn-cache@v2

- name: Install Dependencies using Yarn
run: yarn

- name: Build Packages
run: yarn build

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
commit: 'chore(release): update monorepo packages versions'
title: 'Upcoming Release Changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
stable:
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main
with:
releaseScript: release
nodeVersion: 22
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
npmToken: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -17,3 +17,6 @@ examples/**/node_modules

*.tsbuildinfo
coverage/
.bob
.env
.graphclient
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -13,6 +13,6 @@
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/node_modules": true
"**/node_modules": false
}
}
Loading