#[dagger print] inspecting objects
1 messages · Page 1 of 1 (latest)
I don't think there is right now. The main limitation is that we're using the query builder from the go sdk and it doesn't support selecting multiple fields on a single return. I guess that's the one disadvantage of using it relative to a raw graphql query builder.
If we added support for that, then you could do this since we could just give OnSelectObjectLeaf the type def for the object, which would let you know what fields exist so you could select them all. Then the response you'd get would be a map[string]any and you could go from there in terms of printing it
You can use the approach in shell. Select the container id and in the response, turn it into dgger.Container and access the fields from there.
I found a hack for now: when the result is a string, I check for core.XXX: prefix, and infer the ID type from there
Yes but I want to select IDs from all types, not just container. So I needed the additional step of figuring out which ID. But found a hack to make it work
Well, yeah I do want any objects. But have lowered my bar for a first implementation
supporting core types would be a great start
Then, more hacks 🙂
I'm also fighting a few other battles, see my latest message in #daggernauts about TUI output
You have the typedef in AfterResponse, so it should tell you at least which type it is from the object's name, as a string.