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

Updated webhook subscription topic constants #366

Merged
merged 3 commits into from
Sep 11, 2024
Merged

Conversation

kisuka
Copy link
Contributor

@kisuka kisuka commented Sep 7, 2024

WHY are these changes introduced?

Currently you cannot use a large number of webhook topics using the current method of constants. This is due to them not being present within the Topics.php file.

WHAT is this pull request doing?

Adds missing webhook subscription topic constants to match the current list for 2024-07 located here:
https://shopify.dev/docs/api/admin-graphql/2024-07/enums/webhooksubscriptiontopic

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above
  • I have added/updated tests for this change
  • I have updated the documentation for public APIs from the library (if applicable)

@kisuka
Copy link
Contributor Author

kisuka commented Sep 7, 2024

I have signed the CLA

Copy link
Contributor

@lizkenyon lizkenyon left a comment

Choose a reason for hiding this comment

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

Hi there 👋

First off big thank you for your contribution!

Could you add a changelog entry for this change?

Secondly were you finding that you were getting errors when you were passing in these topics as a string instead of using the constant?
Our hope is that you should be able to use either, so if there is a place throwing an error when using a string, (and then forces us to have to update these constants when a new topic is released), I want to resolve that as well.

@kisuka
Copy link
Contributor Author

kisuka commented Sep 10, 2024

@lizkenyon No problem. Added the changelog entry. Wasn't getting any issues when using strings instead of constants, just figured it should probably remain consistent if historically they've been used and are in the codebase.

@lizkenyon
Copy link
Contributor

@lizkenyon No problem. Added the changelog entry. Wasn't getting any issues when using strings instead of constants, just figured it should probably remain consistent if historically they've been used and are in the codebase.

Perfect! I agree we should definitely have these.

It looks like there are a few linting errors that are causing the CI to fail. Once you resolve those we can get this merged.

@kisuka
Copy link
Contributor Author

kisuka commented Sep 11, 2024

@lizkenyon No problem. Added the changelog entry. Wasn't getting any issues when using strings instead of constants, just figured it should probably remain consistent if historically they've been used and are in the codebase.

Perfect! I agree we should definitely have these.

It looks like there are a few linting errors that are causing the CI to fail. Once you resolve those we can get this merged.

Done :) Lemme know if that method of multi-line is okay or if there's another practice that should be followed.

@lizkenyon lizkenyon merged commit 18d1d3f into Shopify:main Sep 11, 2024
4 checks passed
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