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

Unify the Node.js API for providers #224

Closed
lfades opened this issue Mar 11, 2021 · 2 comments · Fixed by #252
Closed

Unify the Node.js API for providers #224

lfades opened this issue Mar 11, 2021 · 2 comments · Fixed by #252
Assignees
Labels
enhancement New feature or request

Comments

@lfades
Copy link
Member

lfades commented Mar 11, 2021

Currently we have API methods that work under /api/bigcommerce/* that applies for all providers. The API used for the Node.js side of the commerce demo should be unified in a similar way of the agnostic provider we currently have for the UI hooks.

@lfades lfades self-assigned this Mar 11, 2021
@lfades lfades added the enhancement New feature or request label Mar 11, 2021
@okbel okbel pinned this issue Mar 16, 2021
@Vandivier
Copy link
Contributor

@lfades I support this but let's also think one step higher in abstraction: There are some API that go beyond providers and would be used for any back end. For example, isAllowedMethod.

ref: vercel/next.js#25599

As a side note, I find the higher-order hook implementation like swell/.../use-signup.tsx to be really hard to reason about. Just a note that 'unify the API' doesn't need to be done with a compositional approach. isAllowedMethod, for example, could simply be pasted in framework/utils and the other files could directly import it without composition.

@lfades
Copy link
Member Author

lfades commented Jun 3, 2021

@Vandivier isAllowedMethod was moved to be inside commerce so that's already the case, on the note about compositional approach that's a requirement because providers don't match each other's features, each provider adds what they can do

@lfades lfades unpinned this issue Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants