Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: optimize coin gql queries #3301

Merged
merged 12 commits into from
Nov 13, 2024
Merged

Conversation

maschad
Copy link
Member

@maschad maschad commented Oct 10, 2024

Release notes

In this release, we:

  • Optimized the getCoins provider endpoint

Summary

  • Removed getCoin gql query from the provider operations as it is unused in our SDK.
  • Removed the owner from the coinFragment as it can be populated in the calling functions for both:
    • getCoins
    • getResourcesToSpend

Breaking Changes

  • The Provider.operations.getCoins() and Provider.operations.getCoinsToSpend function no longer return the owner. These methods shouldn't be called directly but are used internally to formulate responses from the SDK.

  • Removed the property owner from the Provider.operations.getCoinsToSpend() function. Suggest to use the owner from the input parameters.

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

Copy link

vercel bot commented Oct 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 2:55am
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 2:55am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
ts-docs-api ⬜️ Ignored (Inspect) Nov 13, 2024 2:55am

@github-actions github-actions bot added the bug Issue is a bug label Oct 10, 2024
@maschad maschad changed the title fix: optimize coin queries fix: optimize coin gql queries Oct 10, 2024
Copy link

codspeed-hq bot commented Oct 10, 2024

CodSpeed Performance Report

Merging #3301 will not alter performance

Comparing mc/fix/optimize-get-coin-queries (d919c23) with master (f607ba2)

Summary

✅ 18 untouched benchmarks

@maschad maschad marked this pull request as ready for review October 10, 2024 00:18
@maschad maschad self-assigned this Oct 10, 2024
.changeset/young-steaks-brake.md Outdated Show resolved Hide resolved
danielbate
danielbate previously approved these changes Oct 10, 2024
nedsalk
nedsalk previously approved these changes Oct 10, 2024
@maschad maschad changed the title chore!: optimize coin gql queries chore: optimize coin gql queries Nov 12, 2024
@maschad maschad marked this pull request as ready for review November 12, 2024 09:48
@maschad maschad changed the title chore: optimize coin gql queries chore!: optimize coin gql queries Nov 12, 2024
@maschad
Copy link
Member Author

maschad commented Nov 12, 2024

I've decided to restore the getCoins method but this is still breaking as the owner is no longer returned in the ...coinFragment gql fragment

@maschad maschad enabled auto-merge (squash) November 13, 2024 02:46
Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
65.18%(+0%) 69.67%(+0%) 73.39%(+0%) 65.6%(+0%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/account/src/providers/generated/operations.ts 94.7%
(+0.04%)
100%
(+0%)
84%
(+0%)
95.12%
(+0.03%)

@maschad maschad merged commit 174876c into master Nov 13, 2024
25 checks passed
@maschad maschad deleted the mc/fix/optimize-get-coin-queries branch November 13, 2024 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug chore Issue is a chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize coin's graphql queries
7 participants