MCPcopy
hub / github.com/dagger/dagger / IntrospectionJSON

Method IntrospectionJSON

toolchains/engine-dev/main.go:320–330  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

318// Introspect the engine API schema, and return it as a json-encoded file.
319// This file is used by SDKs to generate clients.
320func (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
333func (dev *EngineDev) GraphqlSchema(

Callers 1

invokeFunction · 0.45

Calls 6

PlaygroundMethod · 0.95
FileMethod · 0.65
CodegenMethod · 0.65
WithExecMethod · 0.45
WithFileMethod · 0.45
BinaryMethod · 0.45

Tested by

no test coverage detected