(ctx context.Context, dag *dagql.Server, hiddenTypes []string)
| 136 | } |
| 137 | |
| 138 | func 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 | } |
no test coverage detected