Commit b8c776f
maint: centralize, standardize graphql codegen just commands as python scripts (#25503)
## Summary & Motivation
Make graphql based codegen more consistent and understandable.
Root level just command to regenerate all graphql code, across internal and oss.
|-> dagster-cloud just command to regenerate all graphql code in internal
|-> dagster-oss jus command to regenerate all graphql code in oss
commands generate both FE and BE code in the order necessary for both to be fully updated (FE used to generate a schema, which BE then relied upon, which seems super backward, but whatever).
There are still two strange things left with this, which I couldn't think of a good solution for.
1 BE codegen relies on FE codegen - the PR handles this by just making sure they run in the right order. I think ideally there'd be a step that created the schema.graphql files for app-cloud and admin-cloud / oss in some kind of central, intuitively shared location, which BE and FE specific codegen steps would both reference, but I wasn't sure about the FE codegen tools reaching outside their directories and increasing the blast radius. Maybe later.
2 OSS codegen relies on Internal codegen - I think this is just intractable. dagster-rest-resources, an OSS project, relies on hitting internal graphql resolvers, which means its codegenerated client needs to read the internal schema.graphql. dagster-rest-resources needs access to those resolvers to support functionality in dg-cli, which is also an OSS project. The root is the fact that OSS stuff truly does rely on Internal stuff, and that showing up in the codegen is just a manifestation of that root weirdness. This PR does handle that whole situation a little more elegantly than the status quo. It will skip that step if it cannot successfully resolve the internal schema, instead of trying to run against a file that might not exist.
The actual substantial, non codegen changes in the diff are not so big
## Test Plan
delete all the codegen stuff locally, regenerate, see if anything changes or fails to regenerate
ci
Internal-RevId: 4deddedb539cdade9a4121030abcfa318fe52a141 parent f0b753b commit b8c776f
13 files changed
Lines changed: 770 additions & 158 deletions
File tree
- .claude
- js_modules
- ui-core
- src
- graphql
- scripts
- python_modules/libraries/dagster-rest-resources
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 61 | | |
71 | 62 | | |
72 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 4 | | |
10 | 5 | | |
11 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments