Closed allanmaio closed 2 years ago
Please note, that the preview URL of the File is not a CDN URL that can be used in the same way as all other URLs.
If possible, this should be passed down to the Component as an Icon property instead of the preview URL. Additionally, we now see the need to pass down the ID of the asset too.
Pass down additional Properties:
AEM handles files all the same
https://frontify.github.io/public-api-explorer/#/ https://le0daniel.github.io/graphql-reference/ https://developer.frontify.com/d/XFPCrGNrXQQM/asset-processing#/operations/resizing
FYI I've created a ticket to track the changes on the current query we have for images https://github.com/Frontify/frontify-aem-connector/issues/30
@gbenejam I edited the query above and added some context to the downloadUrl...
I would highly suggest to use query variables:
query ListProjectsByBrandId($brandId: ID!) {
brand: node(id: $brandId) {
... on Brand {id, ...}
}
}
curl request simplified
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <token>" \
-d '{"query": "query ($id: ID!) { node(id: $id) {id} }", "variables": {"id": "<ID>"}}' \
https://{domain}/graphql
One thing we did only briefly discuss, if its a file, the preview URL does not offer any manipulations, as it is not a CDN URL.
Could we in the file case, pass it as a property called iconUrl, just to make it more explicit?
Requirements
Include non image assets such as video, documents, files and audio. Icons per asset type provided by the API using previewUrl
Acceptance Criteria
Solution Hint
The asset types are available in GraphQL as following: