MCPcopy Create free account
hub / github.com/dagger/dagger / persistedDecodeQuery

Function persistedDecodeQuery

core/persisted_object.go:25–38  ·  view source on GitHub ↗
(dag *dagql.Server)

Source from the content-addressed store, hash-verified

23}
24
25func persistedDecodeQuery(dag *dagql.Server) (*Query, error) {
26 if dag == nil {
27 return nil, fmt.Errorf("persisted decode query: nil dagql server")
28 }
29 root := dag.Root()
30 if root == nil {
31 return nil, fmt.Errorf("persisted decode query: nil dagql root")
32 }
33 query, ok := dagql.UnwrapAs[*Query](root)
34 if !ok {
35 return nil, fmt.Errorf("persisted decode query: root is %T", root.Unwrap())
36 }
37 return query, nil
38}
39
40func encodePersistedCallID(id *call.ID) (string, error) {
41 if id == nil {

Calls 2

UnwrapMethod · 0.65
RootMethod · 0.45

Tested by

no test coverage detected