Repository navigation
fix(typescript): build the returned resource on the System Nexus path - #267
Conversation
| [notification-service] | ||
| languages = ["python", "dotnet", "typescript"] | ||
|
|
||
| [start-workflow] |
There was a problem hiding this comment.
This doesn't make a lot of sense. Why are we running start-workflow as system nexus on TS only? start-workflow was never really intended as a system nexus example.
There was a problem hiding this comment.
It does sound like you need a system nexus + resource sample, but converting this one just in TS is strange. I think you need a new one, which can run only in TS if it only works in TS for now.
There was a problem hiding this comment.
Agreed, that was the wrong sample to use. I put start-workflow back the way it was and added a small workflow-handle sample in 2c3a911. It's just a System Nexus start-workflow operation that returns a workflow-handle resource. In bf84b7c it also generates for Python and .NET, which already build the resource. On main its TypeScript output is return result as WorkflowHandle;, and with this PR it's return new WorkflowHandle(...). That also let me drop the system_nexus_languages option, so examples.toml just gets the new table.
4ec6f17 to
d9b9b23
Compare
tconley1428
left a comment
There was a problem hiding this comment.
Not part of this one, but I wonder if we should start grouping system nexus examples.
d9b9b23 to
b6ecace
Compare
What changed?
This PR makes a TypeScript System Nexus operation that returns a resource build the resource from the answer, as the endpoint path does.
Why?
The answer is the resource's wire message. The cast compiled, but a resource method call on the result failed at run time.
How did you test it?
A new
workflow-handlesample, for TypeScript, Python and .NET. Its TypeScriptstart-workflow.tsreturnedresult as WorkflowHandleand now returnsnew WorkflowHandle(...), as Python and .NET already do. The .NET sample build leaves it out, as it doesmulti-operation-service, because two System Nexus samples define the same helper types.