Open dglazkov opened 7 months ago
Sure, and this shows a few underlying issues that we might want to tackle:
describe
on input
and output
(which gets that on-wire schema passed in) to create the schema on the fly?map
outputting schema
: ah, that's probably because output
emits it, but maybe it shouldn't? or more broadly, it feels like schema should be out of band, not a regular wire. congruent with the first point. This would then also support using graphs in map
that do have schemas defined, e.g. because one is reusing some existing graph there.blank.ts
specifically, it looks like it has a text
wire, so i think all you see here is that if there is no type associated, it's assumed to be a string input. we could make it fail if there is no type associated instead, but i think that's debatable.So short term you could leave the automatic generation in, but remove drop all the wires that don't have an explicitly set title. But the real solution would be to start serializing schema information as first class citizen on wires and maybe also on nodes.
Now that I've used the new syntax for a little bit, I am realizing that trying to infer input/output schemas for graphs is mostly in the way. It introduces artifacts that I didn't expect. Here are a couple of examples:
blank.ts
graph, it is surprising to see that it produces a graph requiring text input and text output. This is not something that the developer of the graph specified.schema
inferred for the output node appears in the output of the map run, and has to be filtered out.Let's remove that machinery.
@seefeldb WDYT?