#hey @jedevc can I get a quick

1 messages ยท Page 1 of 1 (latest)

grave aspen
#

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.

cursive dirge
#

yes that works ๐Ÿ˜„

#

i'm happy to not have the dagop wrapping for these methods right now btw

grave aspen
#

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?

cursive dirge
#

yup s.srv should still be available ๐Ÿ™‚

#

only dagop isn't available

#

but that shouldn't be an issue i don't think?

grave aspen
#

oh, for some reason I thought they were heavily coupled. I'll try to simplify things.

cursive dirge
#

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