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

Generate explicit type for variables used in a subscription to work with URQL v4 #494

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

mlesin
Copy link
Contributor

@mlesin mlesin commented Nov 13, 2023

Description

Generate explicit type for variables used in a subscription to work with URQL v4

This is basically the same as accepted #329 (comment) but for subscriptions.

Otherwise it doesn't compile generated files if subscription have a required variable.

WARNING: This is possibly a breaking change - now it requires to define empty object for variables argument if no variables are used in subscription

Related #328

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • This change requires a documentation update

Test Environment:

  • OS: Linux
  • @graphql-codegen/typescript-vue-urql:
  • NodeJS: 18.14.0

Checklist:

  • I have followed the
    CONTRIBUTING doc and the
    style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

…ith urql v4

Otherwise it doesn't work if subscription have a required variable
Possibly a breaking change - now it requires to define empty object for variables argument if no variables are used in subscription
Copy link

changeset-bot bot commented Nov 13, 2023

🦋 Changeset detected

Latest commit: d6bf137

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphql-codegen/typescript-vue-urql Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -0,0 +1,6 @@
---
'@graphql-codegen/typescript-vue-urql': minor
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should ship this as a breaking change cause I don't want users to have a surprise upgrading if we are making it more explicit

Suggested change
'@graphql-codegen/typescript-vue-urql': minor
'@graphql-codegen/typescript-vue-urql': major

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main breaking change in #328 was already released as I know, subscription part is not so widely used as I see from much less reactions, but lets do what is better for the project

@saihaj saihaj added the waiting-for-answer Waiting for answer from author label Feb 2, 2024
@mwahlhuetter
Copy link

@saihaj Any news on when this will be merged?

Copy link
Collaborator

@saihaj saihaj left a comment

Choose a reason for hiding this comment

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

Thank you!

@saihaj saihaj merged commit b79e1a0 into dotansimha:main Mar 6, 2024
14 checks passed
@github-actions github-actions bot mentioned this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-answer Waiting for answer from author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants