QueryBuilder returns a querybuilder.Selection from the shell state
(dag *dagger.Client)
| 351 | |
| 352 | // QueryBuilder returns a querybuilder.Selection from the shell state |
| 353 | func (st ShellState) QueryBuilder(dag *dagger.Client) *querybuilder.Selection { |
| 354 | q := querybuilder.Query().Client(dag.GraphQLClient()) |
| 355 | for _, call := range st.Calls { |
| 356 | q = q.Select(call.Name) |
| 357 | for n, v := range call.Arguments { |
| 358 | q = q.Arg(n, v) |
| 359 | } |
| 360 | if call.InlineFragment != "" { |
| 361 | q = q.InlineFragment(call.InlineFragment) |
| 362 | } |
| 363 | } |
| 364 | return q |
| 365 | } |
| 366 | |
| 367 | // GetTypeDef returns the introspection definition for the return type of the last function call |
| 368 | func (st *ShellState) GetTypeDef(modDef *moduleDef) (*modTypeDef, error) { |
no test coverage detected