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

Function schemaJSONFileFromServer

core/schema_build.go:138–157  ·  view source on GitHub ↗
(ctx context.Context, dag *dagql.Server, hiddenTypes []string)

Source from the content-addressed store, hash-verified

136}
137
138func schemaJSONFileFromServer(ctx context.Context, dag *dagql.Server, hiddenTypes []string) (dagql.Result[*File], error) {
139 var schemaJSONFile dagql.Result[*File]
140 if err := dag.Select(ctx, dag.Root(), &schemaJSONFile,
141 dagql.Selector{
142 Field: "__schemaJSONFile",
143 // Programmatic selectors do not inherit the server view, but this file's
144 // contents include __schemaVersion and must match the module's view.
145 View: dag.View,
146 Args: []dagql.NamedInput{
147 {
148 Name: "hiddenTypes",
149 Value: dagql.ArrayInput[dagql.String](dagql.NewStringArray(hiddenTypes...)),
150 },
151 },
152 },
153 ); err != nil {
154 return schemaJSONFile, fmt.Errorf("failed to select introspection JSON file: %w", err)
155 }
156 return schemaJSONFile, nil
157}

Callers 1

Calls 3

NewStringArrayFunction · 0.92
SelectMethod · 0.65
RootMethod · 0.45

Tested by

no test coverage detected