英文:
What are possible ways to fetch image thumbnails from Data hub API query in Pimcore?
问题
I'm trying to get the Pimcore Advanced Certificate.
I've done all chapters, except only one question, I'm trying 2 weeks and I'm confused ![]()
The question is about to fetch the thumbs with GraphQI:
"What are possible ways to fetch image thumbnails from Data hub API query?"
The four multi-answers are:
- Using Transformers for image attribute in the schema definition.
- By providing thumbnail parameter on image attribute fullpath in the query.
- By using GraphQL inline fragment.
- By just requesting fullpath of image attribute.
The transformes I think is not mandatory, but is correct.
The third maybe is correct, because I need to write a queries as inline fragment.
After in video example if I write only fullpath I can't have thumb (i get only url, if there are correctly setted permissions on assets), so I've excluded it.
If I put as correct 2 and 3 are wrong... If I add the 1st as still wrong. The same thing if I add the 4th.
I'm confused..
I need to understand how are possible to fetch image thumbnails from Data Hub API query in Pimcore.
英文:
I'm trying to get the Pimcore Advanced Certificate.
I've done all chapters, except only one question, I'm trying 2 weeks and I'm confused ![]()
The question is about to fetch the thumbs with GraphQI:
"What are possible ways to fetch image thumbnails from Data hub API query?"
The four multi-answers are:
- Using Transformers for image attribute in the schema definition.
- By providing thumbnail parameter on image attribute fullpath in the query.
- By using GraphQL inline fragment.
- By just requesting fullpath of image attribute.
The transformes I think is not mandatory, but is correct.
The third maybe is correct, because I need to write a queries as inline fragment.
After in video example if I write only fullpath I can't have thumb (i get only url, if there are correctly setted permissions on assets), so I've excluded it.
If I put as correct 2 and 3 are wrong... If I add the 1st as still wrong. The same thing if I add the 4th.
I'm confused..
I need to understand how are possible to fetch image thumbnails from Data Hub API query in Pimcore.
答案1
得分: 1
Correct answers are:
示例:
{
getAssetFolder(fullpath: "/Car Images/vw/") {
children {
... on asset {
thumbnail:fullpath(thumbnail: "my_thumbnail")
}
}
}
}
您还可以在作弊表中找到其他答案:
英文:
Correct answers are:
-
Using Transformers for image attribute in the schema definition https://pimcore.com/docs/data-hub/current/GraphQL/Configuration/Schema_Settings.html
-
By providing thumbnail parameter on image attribute fullpath in the query. https://pimcore.com/docs/data-hub/current/GraphQL/Query/Query_Samples/Sample_GetAsset.html
Sample:
{
getAssetFolder(fullpath: "/Car Images/vw/") {
children {
... on asset {
thumbnail:fullpath(thumbnail: "my_thumbnail")
}
}
}
}
Another answers you can find in the cheat sheet:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论