fix(search)!: let a derive read a Reference Type entry’s node IRI - #843
Merged
Conversation
- an entry carries the IRI of the node it was projected from as `id` for as long as a derive on the referrer can read it, then loses it in the same pass that prunes internal fields, so neither the index nor the API sees it - the entry dedupe ignores that `id`, so two edge nodes stating one fact are still one entry - the case it exists for is a referent stated by its IRI alone, such as a IIIF manifest among a work’s associated media, which a derive surfaces under a field of its own; nothing to declare
…ojection fills it - a lookup target and a local lookup carry an `id`; a Reference Type entry never does past the projection, so the field the emitted edge type kept was always null - BREAKING CHANGE: an edge type built from a Reference Type loses its `id` field
ddeboer
force-pushed
the
feat/search-identity-on-reference-type
branch
from
September 9, 2026 13:50
ed79595 to
f94cc8f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #842.
#832 stopped a Reference Type entry from carrying an
id, on the grounds that nothing read it. One thing did: aderiveon the referrer. Linked Open Limburg picks the IIIF manifest out of a work’sassociatedMediaentries byencodingFormatand returns that entry’sid, and SCHEMA-AP-NDE states the manifest URL nowhere else – the entry has an@idand nocontentUrl. On 0.26.0 the field comes outundefinedfor every work.The node IRI is a reading device
The projection already has the concept this needs. An internal field is populated so a later
derivecan read it and pruned before the document leaves, so it reaches neither the writer nor the API. An entry’s node IRI now follows the same rule:id, and a derive on the referrer can read itpruneInternalFieldsdeletes it from a Reference Type entry in the same pass that deletes the internal fields, after every derive has runA Root Type keeps its
idwherever it nests: that is the key its own collection files it under, and alocallookup resolves against it.Nothing to declare. Everything #832 wanted still holds past the projection: one shape per entry whether the node was named or blank, nothing stored that the collection does not declare, no
idon an edge type. The test from #832, “no id however the graph named the edge”, keeps passing because it reads a pruned document.I started with a flag on the type (
identified: true, thenhasId) and threw it out: it made the author learn a new member to get back something a derive could read before, and its name kept colliding withref.identity. Exposing a nested node’s IRI in the API per entry is the one thing this cannot do, and nobody has asked for it.The GraphQL half #832 announced
The 0.26.0 changelog said an edge type loses its
idfield in a GraphQL surface. The adapter kept emitting it on every nested type, always null. The second commit offersidonly where the projection fills it: a lookup target and alocallookup. That is a change to the published surface for any deployment nesting a Reference Type, so it is marked breaking.Downstream
No schema change in LOL. The projection-level test on limburg/lol#173 goes green once this ships; the GraphQL schema there loses
CreatorRole.id,ContributorRole.idandMediaObject.id, all null since 0.26.