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

Flat objects services #1150

Open
mrlubos opened this issue Oct 13, 2024 · 0 comments
Open

Flat objects services #1150

mrlubos opened this issue Oct 13, 2024 · 0 comments
Labels
feature 🚀 New feature or request RSVP 👍👎 Explicit request for reactions to gauge interest in resolving this issue

Comments

@mrlubos
Copy link
Member

mrlubos commented Oct 13, 2024

Add ability to roll up all arguments into a single object.

api.foo({
  path: {
    foo_id: 'foo',
  },
  query: {
    bar: 'bar',
  },
})

would become

api.foo({
  foo_id: 'foo',
  bar: 'bar',
})

This would come with a few known caveats.

  • you need to be sure there will be no conflicting names across parameters. If yes, perhaps we could explore a conflict resolution strategy, though that wouldn't be a priority
  • to add any additional values, perhaps a second argument could be used
  • this change would apply only to services, raw clients will remain as is (modifying them would turn them into a service layer)
@mrlubos mrlubos added feature 🚀 New feature or request RSVP 👍👎 Explicit request for reactions to gauge interest in resolving this issue labels Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🚀 New feature or request RSVP 👍👎 Explicit request for reactions to gauge interest in resolving this issue
Projects
None yet
Development

No branches or pull requests

1 participant