Repository navigation
NodeJS: Create with() method to chain objects - #4332
Conversation
with() method to chain objects
TomChv
left a comment
There was a problem hiding this comment.
That's an excellent new feature! About code generation, I think each type that is composed of a query could have the method with that with the same content as in the PR.
Why should we do this to all types composed of query?
For consistency and to avoid the particular case, it's more complex to generate a with only for containers that generate a with for all types with queries in.
WDYT @dolanor @slumbering ?
Agreed with that. Every types should have a |
a2a6220 to
996fd0b
Compare
996fd0b to
c8e6227
Compare
bce5012 to
e41f9fb
Compare
I've just updated the template to get the |
0409ce5 to
6e577cb
Compare
c48affe to
4d619ce
Compare
|
I updated this PR with an implementation of the Go @helderco do you think you can do it for python? |
|
Instead of multiple people being assigned to the same PR, especially for different SDKs, I prefer separate issues/PRs. I want to do it, but the when depends of backlog priorities. |
|
@helderco So can we merge this PR if it's supports correctly |
4d619ce to
99c7db7
Compare
Agree with that. There is no rush and this is not a priority AFAIK. It was just a nice to have @TomChv. |
I think so, at which point it can become a priority to keep the SDKs in sync, but it doesn't take long to implement. |
99c7db7 to
ff37b59
Compare
Signed-off-by: jffarge <[email protected]>
Signed-off-by: jffarge <[email protected]>
Signed-off-by: jffarge <[email protected]>
ff37b59 to
15ec87d
Compare
|
Waiting for approval and once checks passed, I'll merge this PR |
I might not understand what are |
dolanor
left a comment
There was a problem hiding this comment.
remove with for the types that don't need it. Unless I'm wrong.
The purpose of function gitFunc(c) {
return c
.branch('foo')
.tag('bar')
...
}
connect(async (client) => {
const src = client.git("http").with(gitFunc)
})We've also choose here to use |
|
Ok, I think I see now. Good for me! |
with() method to chain objectswith() method to chain objects
Close to the issue:
With(...)#3885This first iteration is using the pattern proposed by @sipsma.
@dolanor I know that you're doing some refactoring with the codegen so I'll leave you this part (talking about adding the
with()method). You can directly push on this PR. ThanksSigned-off-by: jffarge [email protected]