Skip to content

Bump SDK version to 2.0.0 and fix update workflow#67

Open
snoble wants to merge 6 commits intodevfrom
fix/update-queries-fragment-cli
Open

Bump SDK version to 2.0.0 and fix update workflow#67
snoble wants to merge 6 commits intodevfrom
fix/update-queries-fragment-cli

Conversation

@snoble
Copy link
Copy Markdown
Contributor

@snoble snoble commented Mar 30, 2026

Summary

  • install the Fragment CLI in updateSDKQueries so GitHub Actions can run yarn update-test-schema
  • refresh generated SDK artifacts to match the current published schema
  • bump the SDK version to 2.0.0

Changes in this version

  • GetLedgerAccountBalance now returns total balance (self + children) instead of ownBalance
  • GetLedgerAccountBalanceWithChildRollup has been removed
  • ListLedgerAccountBalances and ListMultiCurrencyLedgerAccountBalances now accept consistencyMode on childBalance, childBalances, balance, and balances fields

How to Upgrade

  1. Upgrade your schema to use total balance consistency.
  2. Edit your schema JSON. Change ownBalanceUpdates to totalBalanceUpdates in the ledger account consistency config. Change ownBalance to totalBalance in entry conditions. A schema can have only one of ownBalanceUpdates or totalBalanceUpdates.
  3. Deploy the new schema.
  4. You can now set consistencyConfig.totalBalanceUpdates: strong on any account in the tree, and its balance will be strongly consistent.
  5. Upgrade your Fragment SDK to the latest version.
  6. GetLedgerAccountBalance now returns total balance (self + children) instead of ownBalance.
  7. Change $ownBalanceConsistencyMode to $balanceConsistencyMode.
  8. Use GetLedgerAccountBalance instead of GetLedgerAccountBalanceWithChildRollup.

Verification

  • yarn build
  • npx -y @fragment-dev/cli gen-graphql --path tests/fixtures/test-schema.json --output tests/fixtures/test-schema-queries.graphql
  • yarn fragment-node-client-codegen -i tests/fixtures/test-schema-queries.graphql -o tests/fixtures/generated-test-client.ts
  • yarn vitest run tests/valid-graphql-queries.test.ts
  • yarn vitest run tests/client-version.test.ts

The updateSDKQueries workflow runs yarn update-test-schema after build.
The script invoked the global fragment binary, which is not installed on
GitHub-hosted runners, causing exit 127.

Add @fragment-dev/cli as a devDependency and call it via yarn exec so
yarn install in CI provides the binary.

Made-with: Cursor
@snoble snoble force-pushed the fix/update-queries-fragment-cli branch from 2db8090 to f46f480 Compare March 30, 2026 18:52
snoble added 3 commits March 30, 2026 11:55
Install the fragment binary in updateSDKQueries so update-test-schema
keeps using the existing script contract, and refresh generated SDK
artifacts so integration checks pass against current queries.

Made-with: Cursor
Made-with: Cursor
@snoble snoble changed the title fix(ci): install Fragment CLI for update-test-schema in Actions Bump SDK version to 2.0.0 and fix update workflow Mar 30, 2026
snoble added 2 commits March 31, 2026 12:26
Made-with: Cursor
Made-with: Cursor
Copy link
Copy Markdown

@sophieleewu sophieleewu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason this one doesn't have a changelog file like the python and ruby ones do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants