Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Shopify AWS EventBridge for Webhook #1113

Open
veed76 opened this issue Apr 1, 2022 · 9 comments
Open

Shopify AWS EventBridge for Webhook #1113

veed76 opened this issue Apr 1, 2022 · 9 comments
Labels
fix-in-progress In progress help-wanted Contributor help would be nice!

Comments

@veed76
Copy link

veed76 commented Apr 1, 2022

Hi @osiset @Kyon147 @lucasmichot

I'm registering the webhook via AWS EventBridge, I have added the ARN for the webhook address.
Example:

'webhooks' => [
         [
            'topic' => 'app/uninstalled',
            'address' => "arn:aws:events:eu-west-2::event-source/aws.partner/shopify.com/9999999/staging-event-bus"
        ],
],

While I'm installing the app in the Shopify store, I got this error: https://prnt.sc/8KxBgePrZSFC

Can you please check and let me where I'm wrong?

Thank you.

@Kyon147
Copy link
Collaborator

Kyon147 commented Apr 1, 2022

Hi @veed76

I can't say much for your AWS set up but that does not look like a proper qualified url.

The error says what the issue is Invalid URL so I believe that is your problem.

@Kyon147 Kyon147 closed this as completed Apr 1, 2022
@veed76
Copy link
Author

veed76 commented Apr 1, 2022

Thanks @Kyon147 for reply.
just want to know in this package is it possible to pass AWS ARN in webhook Address?

@Kyon147
Copy link
Collaborator

Kyon147 commented Apr 1, 2022

Thanks @Kyon147 for reply. just want to know in this package is it possible to pass AWS ARN in webhook Address?

The webhook needs to be a URL, it's not a requirement of the package but a requirement of Shopify when setting up webhooks using the API.

Here's the docs

@veed76
Copy link
Author

veed76 commented Apr 1, 2022

In shopify Documentation they mentioned that we can pass ARN

https://shopify.dev/apps/webhooks/configuration/eventbridge#define-a-custom-event-pattern

image

@veed76
Copy link
Author

veed76 commented Apr 1, 2022

I just registered via POSTMAN and it works with AWS ARN
image

@veed76
Copy link
Author

veed76 commented Apr 1, 2022

There is a support for webhookSubscriptionCreate. I check in osiste/Laravel Package and there is no support for eventBridgeWebhookSubscriptionCreate GraphQL.

@lucasmichot
Copy link
Collaborator

There is a support for webhookSubscriptionCreate. I check in osiste/Laravel Package and there is no support for eventBridgeWebhookSubscriptionCreate GraphQL.

Hi @veed76 , indeed there is no support.
Feel free to make a PR or just ask a Shopify developer to do it

@Kyon147
Copy link
Collaborator

Kyon147 commented Apr 1, 2022

Interesting, good testing - it looks like webhookSubscriptionCreate uses type URL https://shopify.dev/api/admin-graphql/2022-01/scalars/URL

Which is why eventBridgeWebhookSubscriptionCreate exists to be able to use the ARN routes.

As @lucasmichot mentions - the package does not have that GraphQL support in it, as you've found yourself. So feel free to provide a PR.

@Kyon147 Kyon147 reopened this Apr 1, 2022
@Kyon147 Kyon147 added the help-wanted Contributor help would be nice! label Apr 1, 2022
@veed76
Copy link
Author

veed76 commented Apr 2, 2022

Hi @lucasmichot @Kyon147
I have added the support for eventBridgeWebhookSubscriptionCreate, can you please review the PR: #1114

Thank you.
Vishal Gohil

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fix-in-progress In progress help-wanted Contributor help would be nice!
Projects
None yet
Development

No branches or pull requests

3 participants