Why do instance records retrieved from mod-search lack an `instanceTypeId` field?

Description

As noted in my recent comment to ZF-66, something strange is going on with mod-graphql's inability to get `instanceTypeId` fields from mod-search.

Go to https://folio-snapshot.dev.folio.org/inventory and search for HRID inst000000000025. The resulting record is loaded from https://folio-snapshot-okapi.dev.folio.org/inventory/instances/e54b1f4d-7d05-4b1a-9368-3c36b75d8ac6 and does have an instanceTypeId field – with value 3be24c14-3551-4180-9292-26a786649c8b.

But running the Z39.50 server against snapshot:

So it seems that the same record that ui-inventory fetches is somehow unacceptable to mod-graphql.

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Mike Taylor December 21, 2022 at 4:49 PM

Conclusion: the reason mod-graphql doesn't get an instanceTypeId back from mod-search is that, unlike the old mod-inventory-storage request, it doesn't include that field (and some others) in its search-response summary records — only its full records.

Mike Taylor December 21, 2022 at 4:48 PM

When doing the initial search for inst000000000025, the Snapshot UI fetches

Which breaks down as:

And is on the same endpoint as the request that mod-graphql makes for the Z39.50 server.

And the result is:

Which is identical to what mod-graphql gets back.

Mike Taylor December 21, 2022 at 4:42 PM

By contrast, when the UI fetches the same record in the example given above, it does it by directly addressing the specific record rather than using a search:
https://folio-snapshot-okapi.dev.folio.org/inventory/instances/e54b1f4d-7d05-4b1a-9368-3c36b75d8ac6
That may be why it gets a more detailed record.

Mike Taylor December 21, 2022 at 4:37 PM

So here, mod-graphql's top-level query into mod-search is:

Which breaks down as:

And the result is a record that does not include the instanceTypeId field (or very much at all, actually):

Mike Taylor December 21, 2022 at 4:31 PM

I am now running the Z39.50 server with GraphQL side-loading, so that it contacts a local instance of mod-graphql rather than the one on snapshot. And I am running that local {{mod-graphql }} with URL and response logging turned on. Here's what the beginning of the log says:

Done

Details

Assignee

Reporter

Priority

Sprint

Development Team

Thor

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created December 21, 2022 at 4:11 PM
Updated December 21, 2022 at 4:52 PM
Resolved December 21, 2022 at 4:52 PM
TestRail: Cases
TestRail: Runs