You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background:
WAG operations that accept one argument take that argument as their first parameter.
myClient.myOperation(“foo”);
WAG operations that accept more than one argument take a params object as their first parameter.
myClient.myOperation({ foo: “one”, bar: 2 });
Adding a third optional argument, does not cause a breaking client API change, the call-site still calls the function with a params object.
myClient.myOperation({ foo: “one”, bar: 2, baz: null });
Proposal:
Adding a new optional argument to a WAG operation should not cause a breaking change in the generated API client.
Alternatively, all optional arguments always go inside of a separate options argument at the call site.
The key motivation is to eliminate the surprising nature of adding a new argument, and having to know which number argument it is. Adding a new optional argument should always behave in the same manner.
The text was updated successfully, but these errors were encountered:
Background:
WAG operations that accept one argument take that argument as their first parameter.
myClient.myOperation(“foo”);
WAG operations that accept more than one argument take a params object as their first parameter.
myClient.myOperation({ foo: “one”, bar: 2 });
Adding a third optional argument, does not cause a breaking client API change, the call-site still calls the function with a params object.
myClient.myOperation({ foo: “one”, bar: 2, baz: null });
Proposal:
Adding a new optional argument to a WAG operation should not cause a breaking change in the generated API client.
Alternatively, all optional arguments always go inside of a separate options argument at the call site.
The key motivation is to eliminate the surprising nature of adding a new argument, and having to know which number argument it is. Adding a new optional argument should always behave in the same manner.
The text was updated successfully, but these errors were encountered: