-
Notifications
You must be signed in to change notification settings - Fork 113
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
[WIP] Unauthenticated admin client #407
[WIP] Unauthenticated admin client #407
Conversation
@paulomarg I think we made a mistake in the previous API design. Observe the differences here: Webhook:
Admin:
I believe long term we want |
Dang, you're right - we'd want Not sure if that would work because there are more things under |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's WIP, but just wanted to add some thoughts :) - LGTM so far!
expect(() => shopifyApp(config)).toThrowError(ShopifyError); | ||
}); | ||
|
||
describe('unauthenticated admin context', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should at some point consider breaking this out of shopify-app
, and also creating a suite of tests for the admin context that takes in the context object and runs the tests on it to prevent regressions on one of the surfaces that use it.
4651335
to
8ae5ff3
Compare
WHY are these changes introduced?
We've had multiple requests to be able to instantiate admin clients outside of requests from Shopify.
WHAT is this pull request doing?
This PR introduces a new API:
This allows an app to get a shop from whatever means , and then get an Admin API client for that Request. Possible use cases:
For example:
Type of change
Checklist
yarn changeset
to create a draft changelog entry (do NOT update theCHANGELOG.md
files manually)