(ctx context.Context)
| 201 | } |
| 202 | |
| 203 | func CurrentQuery(ctx context.Context) (*Query, error) { |
| 204 | q, ok := ctx.Value(queryKey{}).(*Query) |
| 205 | if !ok { |
| 206 | return nil, fmt.Errorf("no query in context") |
| 207 | } |
| 208 | return q, nil |
| 209 | } |
| 210 | |
| 211 | func CurrentDagqlServer(ctx context.Context) (*dagql.Server, error) { |
| 212 | // Prefer the dagql server explicitly attached to this resolver context. |
no test coverage detected