-
Notifications
You must be signed in to change notification settings - Fork 11
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
Tweek's javascript client fetch function should have a simpler option when there's no need to override context #100
Comments
What about { user: “John”}, it’s more consistent with both js and Tweek rest style? |
Ok, lets do that then. So it should be:
|
It’s not necessary override, it’s context properties |
the semantics of context are important whether you use rest or other tweek client |
Also the client support giving context in ctor. |
Wow, you right! |
Could be expansion, not just override. |
Cool, so just so we’re clear which options do you think we should implement @Yshayy |
I think adding Shorthand syntax support for context. |
The api for fetching configurations forces the client to pass a configuration object with a nested context object and another nested object per entity type even if there's no need to override the context and there's a need for only one entity. It is also a little weird for the client in general when the context is part of the options object.
Suggestion:
Create an overload utility function for passing only entity type and id:
The text was updated successfully, but these errors were encountered: