Commit fb29671
Support
Add a narrow secondary retrieval path for fields that should stay
returnable in GraphQL while being excluded from stored `_source`.
When a field is marked `retrieved_from: :doc_values`, ElasticGraph:
- keeps the field in GraphQL output types
- excludes the field from datastore `_source` via `_source.excludes`
- requests the field through datastore `docvalue_fields`
- resolves the field from `fields` in datastore hits when `_source` omits it
The change is intentionally narrow: only direct, non-list, non-text
GraphQL leaf fields on indexed root document types are supported.
Query planning only uses `docvalue_fields` when every participating
index definition agrees on the retrieval method.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>retrieved_from: :doc_values for direct leaf fields (#1110)1 parent f3818af commit fb29671
39 files changed
Lines changed: 673 additions & 154 deletions
File tree
- config/schema
- artifacts_with_apollo
- artifacts
- elasticgraph-graphql
- lib/elastic_graph/graphql
- datastore_response
- resolvers
- sig/elastic_graph/graphql
- datastore_response
- schema
- spec
- acceptance
- integration/elastic_graph/graphql/datastore_query
- unit/elastic_graph/graphql
- datastore_query
- datastore_response
- resolvers
- schema
- elasticgraph-indexer/spec/acceptance
- elasticgraph-schema_artifacts
- lib/elastic_graph/schema_artifacts/runtime_metadata
- sig/elastic_graph/schema_artifacts/runtime_metadata
- spec/unit/elastic_graph/schema_artifacts/runtime_metadata
- elasticgraph-schema_definition
- lib/elastic_graph/schema_definition
- indexing
- mixins
- schema_elements
- sig/elastic_graph/schema_definition
- mixins
- schema_elements
- spec/unit/elastic_graph/schema_definition
- datastore_config/index_mappings
- graphql_schema
- runtime_metadata
- spec_support/lib/elastic_graph/spec_support
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1490 | 1490 | | |
1491 | 1491 | | |
1492 | 1492 | | |
| 1493 | + | |
1493 | 1494 | | |
1494 | 1495 | | |
1495 | 1496 | | |
| |||
1537 | 1538 | | |
1538 | 1539 | | |
1539 | 1540 | | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
1540 | 1544 | | |
1541 | 1545 | | |
1542 | 1546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1817 | 1817 | | |
1818 | 1818 | | |
1819 | 1819 | | |
| 1820 | + | |
1820 | 1821 | | |
1821 | 1822 | | |
1822 | 1823 | | |
| |||
3039 | 3040 | | |
3040 | 3041 | | |
3041 | 3042 | | |
| 3043 | + | |
3042 | 3044 | | |
3043 | 3045 | | |
3044 | 3046 | | |
| |||
3170 | 3172 | | |
3171 | 3173 | | |
3172 | 3174 | | |
3173 | | - | |
3174 | | - | |
3175 | | - | |
3176 | 3175 | | |
3177 | 3176 | | |
3178 | 3177 | | |
| |||
3184 | 3183 | | |
3185 | 3184 | | |
3186 | 3185 | | |
3187 | | - | |
3188 | | - | |
3189 | | - | |
3190 | | - | |
3191 | | - | |
3192 | 3186 | | |
3193 | 3187 | | |
3194 | 3188 | | |
| |||
5330 | 5324 | | |
5331 | 5325 | | |
5332 | 5326 | | |
5333 | | - | |
5334 | | - | |
5335 | | - | |
5336 | | - | |
5337 | 5327 | | |
5338 | 5328 | | |
5339 | 5329 | | |
| |||
8454 | 8444 | | |
8455 | 8445 | | |
8456 | 8446 | | |
8457 | | - | |
8458 | | - | |
8459 | | - | |
8460 | | - | |
8461 | 8447 | | |
8462 | 8448 | | |
8463 | 8449 | | |
| |||
9031 | 9017 | | |
9032 | 9018 | | |
9033 | 9019 | | |
9034 | | - | |
9035 | | - | |
9036 | | - | |
9037 | 9020 | | |
9038 | 9021 | | |
9039 | 9022 | | |
| |||
9072 | 9055 | | |
9073 | 9056 | | |
9074 | 9057 | | |
9075 | | - | |
9076 | | - | |
9077 | | - | |
9078 | | - | |
9079 | 9058 | | |
9080 | 9059 | | |
9081 | 9060 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | 158 | | |
164 | 159 | | |
165 | 160 | | |
| |||
238 | 233 | | |
239 | 234 | | |
240 | 235 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | 236 | | |
252 | 237 | | |
253 | 238 | | |
| |||
6977 | 6962 | | |
6978 | 6963 | | |
6979 | 6964 | | |
6980 | | - | |
6981 | | - | |
6982 | | - | |
6983 | | - | |
6984 | | - | |
6985 | 6965 | | |
6986 | 6966 | | |
6987 | 6967 | | |
| |||
17142 | 17122 | | |
17143 | 17123 | | |
17144 | 17124 | | |
17145 | | - | |
17146 | | - | |
17147 | | - | |
17148 | | - | |
17149 | | - | |
17150 | 17125 | | |
17151 | 17126 | | |
17152 | 17127 | | |
| |||
18310 | 18285 | | |
18311 | 18286 | | |
18312 | 18287 | | |
18313 | | - | |
18314 | | - | |
18315 | | - | |
18316 | | - | |
18317 | | - | |
18318 | 18288 | | |
18319 | 18289 | | |
18320 | 18290 | | |
| |||
18375 | 18345 | | |
18376 | 18346 | | |
18377 | 18347 | | |
18378 | | - | |
18379 | | - | |
18380 | | - | |
18381 | | - | |
18382 | | - | |
18383 | 18348 | | |
18384 | 18349 | | |
18385 | 18350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1490 | 1490 | | |
1491 | 1491 | | |
1492 | 1492 | | |
| 1493 | + | |
1493 | 1494 | | |
1494 | 1495 | | |
1495 | 1496 | | |
| |||
1537 | 1538 | | |
1538 | 1539 | | |
1539 | 1540 | | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
1540 | 1544 | | |
1541 | 1545 | | |
1542 | 1546 | | |
| |||
Lines changed: 2 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1846 | 1846 | | |
1847 | 1847 | | |
1848 | 1848 | | |
| 1849 | + | |
1849 | 1850 | | |
1850 | 1851 | | |
1851 | 1852 | | |
| |||
3068 | 3069 | | |
3069 | 3070 | | |
3070 | 3071 | | |
| 3072 | + | |
3071 | 3073 | | |
3072 | 3074 | | |
3073 | 3075 | | |
| |||
3199 | 3201 | | |
3200 | 3202 | | |
3201 | 3203 | | |
3202 | | - | |
3203 | | - | |
3204 | | - | |
3205 | 3204 | | |
3206 | 3205 | | |
3207 | 3206 | | |
| |||
3213 | 3212 | | |
3214 | 3213 | | |
3215 | 3214 | | |
3216 | | - | |
3217 | | - | |
3218 | | - | |
3219 | | - | |
3220 | | - | |
3221 | 3215 | | |
3222 | 3216 | | |
3223 | 3217 | | |
| |||
5453 | 5447 | | |
5454 | 5448 | | |
5455 | 5449 | | |
5456 | | - | |
5457 | | - | |
5458 | | - | |
5459 | | - | |
5460 | 5450 | | |
5461 | 5451 | | |
5462 | 5452 | | |
| |||
8583 | 8573 | | |
8584 | 8574 | | |
8585 | 8575 | | |
8586 | | - | |
8587 | | - | |
8588 | | - | |
8589 | | - | |
8590 | 8576 | | |
8591 | 8577 | | |
8592 | 8578 | | |
| |||
9160 | 9146 | | |
9161 | 9147 | | |
9162 | 9148 | | |
9163 | | - | |
9164 | | - | |
9165 | | - | |
9166 | 9149 | | |
9167 | 9150 | | |
9168 | 9151 | | |
| |||
9201 | 9184 | | |
9202 | 9185 | | |
9203 | 9186 | | |
9204 | | - | |
9205 | | - | |
9206 | | - | |
9207 | | - | |
9208 | 9187 | | |
9209 | 9188 | | |
9210 | 9189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | 191 | | |
197 | 192 | | |
198 | 193 | | |
| |||
271 | 266 | | |
272 | 267 | | |
273 | 268 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | 269 | | |
285 | 270 | | |
286 | 271 | | |
| |||
7259 | 7244 | | |
7260 | 7245 | | |
7261 | 7246 | | |
7262 | | - | |
7263 | | - | |
7264 | | - | |
7265 | | - | |
7266 | | - | |
7267 | 7247 | | |
7268 | 7248 | | |
7269 | 7249 | | |
| |||
17465 | 17445 | | |
17466 | 17446 | | |
17467 | 17447 | | |
17468 | | - | |
17469 | | - | |
17470 | | - | |
17471 | | - | |
17472 | | - | |
17473 | 17448 | | |
17474 | 17449 | | |
17475 | 17450 | | |
| |||
18633 | 18608 | | |
18634 | 18609 | | |
18635 | 18610 | | |
18636 | | - | |
18637 | | - | |
18638 | | - | |
18639 | | - | |
18640 | | - | |
18641 | 18611 | | |
18642 | 18612 | | |
18643 | 18613 | | |
| |||
18698 | 18668 | | |
18699 | 18669 | | |
18700 | 18670 | | |
18701 | | - | |
18702 | | - | |
18703 | | - | |
18704 | | - | |
18705 | | - | |
18706 | 18671 | | |
18707 | 18672 | | |
18708 | 18673 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | | - | |
| 451 | + | |
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
| |||
0 commit comments