Commit 69eaefb
ci: detect graphql schema drift (#761)
* ci: detect drift between committed graphql snapshot and live schema (#754)
Adds a CI step that regenerates packages/api-types/graphql/schema.graphql
and fails on any diff, so a Pothos type/resolver change without the paired
regen surfaces in CI rather than as a runtime mismatch in codegen consumers.
Also refreshes the snapshot itself — graphql-js's printer collapses
single-line descriptions to inline """...""", and the committed copy
predated that formatting, so the new check would have failed on its own
PR without this regen.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ci: ignore generated graphql snapshot in prettier
graphql-js's printSchema collapses single-line descriptions inline
(""text""), but prettier expands them to multi-line. The two formatters
were silently fighting — every regen triggers a prettier diff, and every
prettier-write triggers a schema-drift diff. Add the snapshot to
.prettierignore so the print script is the sole source of truth for
its format.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent cd6714a commit 69eaefb
3 files changed
Lines changed: 22 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
83 | 92 | | |
84 | 93 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 8 | + | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 16 | + | |
21 | 17 | | |
22 | 18 | | |
23 | 19 | | |
| |||
46 | 42 | | |
47 | 43 | | |
48 | 44 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 45 | + | |
52 | 46 | | |
53 | 47 | | |
54 | 48 | | |
55 | 49 | | |
56 | 50 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 51 | + | |
60 | 52 | | |
61 | 53 | | |
62 | 54 | | |
| |||
66 | 58 | | |
67 | 59 | | |
68 | 60 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 61 | + | |
72 | 62 | | |
73 | 63 | | |
74 | 64 | | |
| |||
88 | 78 | | |
89 | 79 | | |
90 | 80 | | |
91 | | - | |
92 | | - | |
93 | | - | |
| 81 | + | |
94 | 82 | | |
95 | 83 | | |
96 | 84 | | |
97 | 85 | | |
98 | 86 | | |
99 | | - | |
100 | | - | |
101 | | - | |
| 87 | + | |
102 | 88 | | |
103 | 89 | | |
104 | | - | |
105 | | - | |
106 | | - | |
| 90 | + | |
107 | 91 | | |
108 | 92 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 93 | + | |
112 | 94 | | |
113 | 95 | | |
114 | 96 | | |
| |||
117 | 99 | | |
118 | 100 | | |
119 | 101 | | |
120 | | - | |
121 | | - | |
122 | | - | |
| 102 | + | |
123 | 103 | | |
124 | 104 | | |
125 | 105 | | |
| |||
129 | 109 | | |
130 | 110 | | |
131 | 111 | | |
132 | | - | |
133 | | - | |
134 | | - | |
| 112 | + | |
135 | 113 | | |
136 | 114 | | |
137 | 115 | | |
| |||
149 | 127 | | |
150 | 128 | | |
151 | 129 | | |
152 | | - | |
153 | | - | |
154 | | - | |
| 130 | + | |
155 | 131 | | |
156 | 132 | | |
157 | 133 | | |
| |||
0 commit comments