Commit 61f1068
authored
fix: align Query mutations with DataHub v1.3+ GraphQL schema (#64)
The CreateQuery and UpdateQuery mutations used a fabricated
QuerySubjects wrapper type that doesn't exist in DataHub's schema.
This caused GraphQL validation errors at runtime:
Field 'datasets' in type 'QuerySubject' is undefined
Three issues fixed:
1. Response selection: subjects { datasets { dataset { urn } } }
changed to subjects { dataset { urn } } — QueryEntity.subjects
returns [QuerySubject!] directly, not a wrapper.
2. Input format: {"subjects": {"datasets": [{datasetUrn: ...}]}}
changed to {"subjects": [{datasetUrn: ...}]} — CreateQueryInput
expects [CreateQuerySubjectInput!]!, a flat array.
3. subjects is now always sent (required field in schema) as an empty
array when no DatasetURNs are provided, instead of being omitted.1 parent bef3896 commit 61f1068
File tree
3 files changed
+32
-43
lines changed- pkg/client
3 files changed
+32
-43
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
| 603 | + | |
| 604 | + | |
607 | 605 | | |
608 | 606 | | |
609 | 607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 92 | + | |
| 93 | + | |
99 | 94 | | |
100 | 95 | | |
101 | 96 | | |
| |||
123 | 118 | | |
124 | 119 | | |
125 | 120 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
134 | 124 | | |
| 125 | + | |
135 | 126 | | |
136 | 127 | | |
137 | 128 | | |
| |||
178 | 169 | | |
179 | 170 | | |
180 | 171 | | |
181 | | - | |
| 172 | + | |
182 | 173 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
| 174 | + | |
187 | 175 | | |
| 176 | + | |
188 | 177 | | |
189 | 178 | | |
190 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 93 | + | |
| 94 | + | |
96 | 95 | | |
97 | | - | |
98 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
99 | 105 | | |
100 | 106 | | |
101 | 107 | | |
| |||
270 | 276 | | |
271 | 277 | | |
272 | 278 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
| 279 | + | |
278 | 280 | | |
279 | | - | |
| 281 | + | |
280 | 282 | | |
281 | | - | |
282 | | - | |
| 283 | + | |
| 284 | + | |
283 | 285 | | |
284 | 286 | | |
285 | 287 | | |
| |||
0 commit comments