Skip to content

Refactor APIs to be a bit more explicit #174

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

Merged
merged 1 commit into from
Nov 1, 2023
Merged

Refactor APIs to be a bit more explicit #174

merged 1 commit into from
Nov 1, 2023

Conversation

slinkydeveloper
Copy link
Collaborator

Refactor example.

Copy link
Contributor

@igalshilman igalshilman left a comment

Choose a reason for hiding this comment

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

Thanks for proposing a different flavor of the API:

+1 for the additional headers, I think that it is a nice improvement let's have it in.
+1 for fixing the ingress port in the example
+1 for the dummyjson example, it is a nice demo.

Regarding the main API change, I'm on the fence but willing to roll with it :-)
So far in any project I've seen you'd usually get an argument object (strange but that is how it works 🤷‍♂️)
If you feel like this is more intuitive then +1 to merge this change.

@slinkydeveloper
Copy link
Collaborator Author

So far in any project I've seen you'd usually get an argument object (strange but that is how it works 🤷‍♂️)

I personally find this much more intuitive, and also in line with the RestateContext API. The object api is just counter-intuitive, and less explicit. Perhaps also @jackkleeman has an opinion about this?

@slinkydeveloper slinkydeveloper merged commit 011c802 into restatedev:main Nov 1, 2023
@slinkydeveloper slinkydeveloper deleted the issues/165-new-api branch November 1, 2023 12:57
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