#hey @jedevc can I get a quick
1 messages ยท Page 1 of 1 (latest)
because if I use Func here my signature of s.exists wouldn't contain the parent dagql.Instance[*core.Directory] arg type, which would break the callback of DagOp(ctx, s.srv, parent, args, s.exists)
the code seems to be working as of this morning ๐
I think I've rubberducked myself out of any confusion.
yes that works ๐
i'm happy to not have the dagop wrapping for these methods right now btw
so would you rather it simply be something closer to:
func (s *directorySchema) exists(ctx context.Context, parent *core.Directory, args existsArgs) (bool, error) {
exists, err := parent.Exists(ctx, s.srv, args.Path, "")
return exists, err
}
if I removed the dagop wrapping, would s.srv still be available?
yup s.srv should still be available ๐
only dagop isn't available
but that shouldn't be an issue i don't think?
oh, for some reason I thought they were heavily coupled. I'll try to simplify things.
s.srv is the dagql server - generally, it's just kind of passed everywhere somehow lol
the main thing it's used for is you can do calls against it (so various handlers will make graphql requests themselves, which is pretty neat)
there's also things like s.View which is used for versioning compatibility, so a handler might choose different behavior depending on which View is present