(t *testctx.T, path, contents string)
| 92 | } |
| 93 | |
| 94 | func newDirWithFile(t *testctx.T, path, contents string) core.DirectoryID { |
| 95 | res, err := testutil.Query[struct { |
| 96 | Directory struct { |
| 97 | WithNewFile struct { |
| 98 | ID core.DirectoryID |
| 99 | } |
| 100 | } |
| 101 | }](t, |
| 102 | `query Test($path: String!, $contents: String!) { |
| 103 | directory { |
| 104 | withNewFile(path: $path, contents: $contents) { |
| 105 | id |
| 106 | } |
| 107 | } |
| 108 | }`, &testutil.QueryOptions{Variables: map[string]any{ |
| 109 | "path": path, |
| 110 | "contents": contents, |
| 111 | }}) |
| 112 | require.NoError(t, err) |
| 113 | |
| 114 | return res.Directory.WithNewFile.ID |
| 115 | } |
| 116 | |
| 117 | func newFile(t *testctx.T, path, contents string) core.FileID { |
| 118 | res, err := testutil.Query[struct { |
no test coverage detected