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

fix: update state when calling mutate #9

Merged
merged 1 commit into from
Jan 16, 2023

Conversation

FiodorGherasimenco
Copy link
Contributor

Calling mutate for gql-mutation is not updating state for fetching and response from mutate.

Description

Apply state to a component as a setter is not affecting component state because component.state is not an instance of State. So to update a state from template we need to call component.setState.

Checklist:

  • I have updated/added documentation affected by my changes.
  • I have added tests to cover my changes.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 16, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: FiodorGherasimenco / name: Fiodor (a5489ee)

@DylanPiercey
Copy link
Contributor

Good catch, thanks for the PR!

@codecov
Copy link

codecov bot commented Jan 16, 2023

Codecov Report

Base: 83.81% // Head: 84.30% // Increases project coverage by +0.48% 🎉

Coverage data is based on head (a5489ee) compared to base (a46e712).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #9      +/-   ##
==========================================
+ Coverage   83.81%   84.30%   +0.48%     
==========================================
  Files          12       12              
  Lines         173      172       -1     
  Branches       21       21              
==========================================
  Hits          145      145              
+ Misses         19       18       -1     
  Partials        9        9              
Impacted Files Coverage Δ
src/components/gql-mutation/index.marko 78.26% <100.00%> (+3.26%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@DylanPiercey
Copy link
Contributor

@FiodorGherasimenco it looks good and CI is passing. Could you sign the CLA?

@FiodorGherasimenco
Copy link
Contributor Author

/easycla

@DylanPiercey DylanPiercey merged commit 1ca874b into marko-js:main Jan 16, 2023
@github-actions
Copy link

🎉 This PR is included in version 2.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants