Skip to content

fix(get_asset_details): include multiValueAttributes in GQL query - #136

Open
Asubtlecoderrr wants to merge 1 commit into
collibra:mainfrom
Asubtlecoderrr:fix/get-asset-details-multi-value-attributes
Open

fix(get_asset_details): include multiValueAttributes in GQL query#136
Asubtlecoderrr wants to merge 1 commit into
collibra:mainfrom
Asubtlecoderrr:fix/get-asset-details-multi-value-attributes

Conversation

@Asubtlecoderrr

@Asubtlecoderrr Asubtlecoderrr commented Sep 8, 2026

Copy link
Copy Markdown

🎯 What does this PR do?

Problem

get_asset_details silently drops attributes backed by MultiValueListAttributeType (multi-select dropdowns). These attributes allow selecting one or more values from a predefined list. In Collibra's GQL schema, they are stored under multiValueAttributes — a separate field that was never included in the query. Single-select attributes (SingleValueListAttributeType) work correctly as they are stored under stringAttributes. As a result, any multi-select attribute is completely absent from the response with no error or warning, regardless of whether one or multiple values are selected.

A secondary issue: resolveAssignableAttributes built its isSet map from only the
four GQL attribute lists, so selection attributes were always marked isSet: false.

Fix

  • Add multiValueAttributes(limit: $attributesLimit) { type { name } } to the GQL query.
  • Add MultiValueAttribute struct and field to Asset.
  • Collibra's GQL schema exposes no scalar value field on MultiValueAttribute
    (stringValue and value are both undefined). Values are enriched via a
    best-effort REST call to /rest/2.0/attributes?assetId=… after the GQL fetch.
  • Include MultiValueAttributes in resolveAssignableAttributes's isSet map.

Testing

Verified locally against a real Collibra instance: get_asset_details for asset
019fd154-9501-72be-b2fc-cb99858b5ae1 now returns
multiValueAttributes: [{ type: { name: "Source Release" }, value: "CE" }]
and assignableAttributes shows isSet: true for it.

✅ Checklist

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation (if needed).
  • My commit messages follow the Conventional Commits standard.

@Asubtlecoderrr
Asubtlecoderrr requested a review from a team as a code owner September 8, 2026 05:34
@Asubtlecoderrr
Asubtlecoderrr force-pushed the fix/get-asset-details-multi-value-attributes branch from 0aac37c to 5582d61 Compare September 8, 2026 05:42
@Asubtlecoderrr
Asubtlecoderrr force-pushed the fix/get-asset-details-multi-value-attributes branch from 5582d61 to 0a44063 Compare September 8, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant