Introspect the engine API schema, and return it as a json-encoded file. This file is used by SDKs to generate clients.
(ctx context.Context)
| 318 | // Introspect the engine API schema, and return it as a json-encoded file. |
| 319 | // This file is used by SDKs to generate clients. |
| 320 | func (dev *EngineDev) IntrospectionJSON(ctx context.Context) (*dagger.File, error) { |
| 321 | playground, err := dev.Playground(ctx, nil, false, false, false, "") |
| 322 | if err != nil { |
| 323 | return nil, err |
| 324 | } |
| 325 | introspectionJSON := playground. |
| 326 | WithFile("/usr/local/bin/codegen", dag.Codegen().Binary()). |
| 327 | WithExec([]string{"codegen", "introspect", "-o", "/schema.json"}). |
| 328 | File("/schema.json") |
| 329 | return introspectionJSON, nil |
| 330 | } |
| 331 | |
| 332 | // Introspect the engine API schema, and return it as a graphql schema |
| 333 | func (dev *EngineDev) GraphqlSchema( |