diff --git a/app/graphql/api/v2/stored_query.rb b/app/graphql/api/v2/stored_query.rb index 9111d77c0c7..5650db3fb2c 100644 --- a/app/graphql/api/v2/stored_query.rb +++ b/app/graphql/api/v2/stored_query.rb @@ -242,6 +242,7 @@ def self.get(query_id) } fragment DossierFragment on Dossier { + __typename id number archived @@ -463,6 +464,7 @@ def self.get(query_id) __typename label stringValue + updatedAt ... on DateChamp { date } @@ -592,11 +594,13 @@ def self.get(query_id) fragment FileFragment on File { + __typename filename contentType checksum byteSize: byteSizeBigInt url + createdAt } fragment AddressFragment on Address { @@ -643,6 +647,7 @@ def self.get(query_id) fragment PageInfoFragment on PageInfo { hasPreviousPage hasNextPage + startCursor endCursor } GRAPHQL diff --git a/app/graphql/extensions/attachment.rb b/app/graphql/extensions/attachment.rb index c0612d8fbdb..633d7a01133 100644 --- a/app/graphql/extensions/attachment.rb +++ b/app/graphql/extensions/attachment.rb @@ -35,7 +35,7 @@ def resolve(object:, **_rest) # is a lazy value (e.g., a Promise – like in our case) def after_resolve(value:, **_rest) if value.respond_to?(:map) - attachments = value.map { after_resolve_attachment(_1) } + attachments = value.map { after_resolve_attachment(_1) }.compact if options[:as] == :single attachments.first