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: update graphql dependency and use features #144

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

totzk9
Copy link
Contributor

@totzk9 totzk9 commented Oct 30, 2024

graphql version 5.1.3 is almost 2 years old, since then numerous updates were made up until 5.2.0-beta.9 version which has more features and more control over the package

old:
Screenshot 2024-10-30 at 8 16 15 PM

new:

Screenshot 2024-10-30 at 8 15 49 PM

I created this PR for PGs who want to use the latest version of graphql package.

@@ -23,7 +23,7 @@ dependencies:
nhost_graphql_adapter: ^4.0.5
dev_dependencies:
fake_async: ^1.3.1
graphql: ^5.1.3
Copy link
Member

Choose a reason for hiding this comment

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

please, let's not upgrade to beta versions unless there is a very good reason for it

@@ -7,7 +7,7 @@ environment:
sdk: ">=2.18.0 <4.0.0"

dependencies:
graphql: ^5.1.3
Copy link
Member

Choose a reason for hiding this comment

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

please, let's not upgrade to beta versions unless there is a very good reason for it

@dbarrosop
Copy link
Member

Hello, thanks a lot for the PR. Just a bit concerned about the upgrade to a beta package but otherwise this LGTM.

@totzk9 totzk9 marked this pull request as draft November 1, 2024 13:46
@totzk9
Copy link
Contributor Author

totzk9 commented Nov 1, 2024

We can leave this PR as draft for now. I'll add a workaround in the issue while waiting for official release.
#143 (comment)

@dbarrosop
Copy link
Member

dbarrosop commented Nov 2, 2024

Sorry, didn't mean to shutdown or delay this PR. If there is a good reason like "there is no further development in the 5.1 branch and this branch is missing much needed features" that might be a good reason to make an exception here. I was mostly trying to understand the rationale behind the use of a beta version so if you could explain a bit the situation that would help moving this PR forward. Thanks again for the work!

@totzk9
Copy link
Contributor Author

totzk9 commented Nov 2, 2024

@dbarrosop Hello
Yes, 5.1 is missing much needed features and it's been far from the lastest version but ultimately I do agree with you on why we should use a stable release. The beta version works for me but for the majority, it's better be safe than sorry on having such risk for everyone.

The latest beta release includes the timeouts, defaultPolicies and other configs I'm not familiar of but can be useful for others. It also allows better support for the latest Flutter versions and other dependencies

@dbarrosop
Copy link
Member

Based on what you are saying and what I could see online I am leaning towards approving the use of this beta version. Looks like 5.1 is 22 months old which isn't too great. I will ask a colleague to review soon.

@onehassan onehassan marked this pull request as ready for review November 25, 2024 15:39
@dbarrosop dbarrosop assigned dbarrosop and unassigned onehassan Jan 7, 2025
@dbarrosop
Copy link
Member

Just a quick update, if by the end of Jan there isn't a stable release I think we should move forward with this PR

@dbarrosop
Copy link
Member

dbarrosop commented Jan 31, 2025

I just checked and no release yet, I'd suggest updating the dep to v5.2.0-beta.10 and then me can merge.

Thanks a lot for the work here.

@totzk9
Copy link
Contributor Author

totzk9 commented Jan 31, 2025 via email

alwaysRebroadcast: alwaysRebroadcast ?? false,
deepEquals: deepEquals,
deduplicatePollers: deduplicatePollers ?? false,
queryRequestTimeout: queryRequestTimeout ?? const Duration(seconds: 5),
Copy link
Contributor Author

@totzk9 totzk9 Jan 31, 2025

Choose a reason for hiding this comment

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

@dbarrosop would it be much better to increase the request timeout for it let's say 1 or 3 mins to avoid unexpected timeouts when devs updates to the new version?
They might have sudden timeouts when they haven't read the new changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: the 5 seconds was taken from the default value of the dep itself

Copy link
Contributor Author

@totzk9 totzk9 Jan 31, 2025

Choose a reason for hiding this comment

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

another side note: we should probably wait for this PR to be merged then update the gql_websocket_link dep before we update to v5.2.0-beta.10

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.

3 participants