Uploaded image for project: 'Frontify'
  1. Frontify
  2. FRONTIFY-6

API data on all asset types

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Medium Medium
    • None
    • None
    • None

      When executing the graphQL query to get the data on an asset, most of the data gets retrieved only on Image type. 

      This is due to Asset is an extensible type that has not all the properties. 

      However, in order to be able to use frontify to choose from other asset types (such as videos and PDF documents), we need to extract some additional information on all the types. 

       

      By Replacing the query on 

      getAssetGraphQlQuery() in the file frontify-dam-connector/src/main/java/info/magnolia/external/dam/frontify/service/FrontifyServiceImpl.java

      with: 

      query AssetById {
        asset: node(id: ASSET_ID) {
          type: __typename
          id
          ... on Asset {
            creator

      {         id         email       }

            createdAt
            modifiedAt
            copyright

      {         status         notice       }

            description
            externalId
            id
            title
            tags

      {         value       }

            metadataValues {         value       }

          }
          ... on Image

      {       extension       filename       width       height       size       previewUrl       downloadUrl       focalPoint     }

          ... on Video

      {       extension       filename       duration       bitrate       width       height       size       previewUrl       downloadUrl     }

          ... on Document

      {       extension       filename       pageCount       size       previewUrl       downloadUrl     }

          ... on File

      {       extension       filename       size       previewUrl       downloadUrl     }

        }

      }

       

      The information needed will be recovered on those types (Image, Video, Document and File) 

        Acceptance criteria

              tmiyar Teresa Miyar
              mducanto Miguel Ducanto
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: