From f2eedd02a0e0bb2d414bd4f9360b1a0cfa0805b6 Mon Sep 17 00:00:00 2001 From: Jeremy Prevost Date: Mon, 5 Feb 2024 11:48:36 -0500 Subject: [PATCH] Updates format to be a single string Why are these changes being introduced: * This was a bug in the graphql spec. TIMDEX has always treated format as a single string Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/GDT-151 How does this address that need: * Updates GraphQL spec to correct the expectation to be a single string Document any side effects to this change: * None of the TIMDEX sources mapped to anything other than a single string for `format`. Therefore, anyone requesting `format` via GraphQL would be getting an error in production at this time. This resolves that problem, so a deprecation does not feel appropriate. This was a bug that caused the inability to use a field, not a change in how a previously usable field is being mapped. * Even though the previous comment remains true, we'll still need to refresh the spec in our deployed timdex ui instances as the spec has indeed changed. --- app/graphql/types/record_type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/graphql/types/record_type.rb b/app/graphql/types/record_type.rb index e4f62f1..882e3fa 100644 --- a/app/graphql/types/record_type.rb +++ b/app/graphql/types/record_type.rb @@ -163,7 +163,7 @@ class RecordType < Types::BaseObject field :contents, [String], null: true, description: 'Table of contents for item' field :summary, [String], null: true, description: 'Summary of contents of item (also where abstract goes if applicable)' - field :format, [String], null: true, description: 'Format of item e.g. "Print Volume", "DVD", etc.' + field :format, String, null: true, description: 'Format of item e.g. "Print Volume", "DVD", etc.' field :literary_form, String, null: true, description: 'Identifies the item as fiction or nonfiction' field :related_place, [String], null: true, deprecation_reason: 'Use `locations`' field :in_bibliography, [String], null: true, deprecation_reason: 'Use `related_items`'