-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[frontend-api] Entity images can now be loaded via fronted API #1486
Conversation
TomasLudvik
commented
Oct 31, 2019
Q | A |
---|---|
Description, reason for the PR | Images are necessary part of e-commerce solutions. This PR enabled possibility to load images of all current entities with images. |
New feature | Yes |
BC breaks | No |
Fixes issues | ... |
Have you read and signed our License Agreement for contributions? | Yes |
6d66edc
to
5b7dedf
Compare
Hello, can I call only one request for more images for same entityType? For example, I have 24 products on product list, but I do not want to call 24 requests to get images for that. |
You do not have to, you can call it in query for all products. |
b7d5cc3
to
0f24c71
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with it but still left a few comments.
And I would like to suggest add unit tests at least for ImageResolver. Also I am still thinking if ImageResolver
should not be abstract class 🤔
packages/frontend-api/src/Model/Resolver/Image/ImagesResolver.php
Outdated
Show resolved
Hide resolved
packages/frontend-api/src/Model/Resolver/Image/ImagesResolver.php
Outdated
Show resolved
Hide resolved
packages/frontend-api/src/Model/Resolver/Image/ImagesResolver.php
Outdated
Show resolved
Hide resolved
packages/frontend-api/src/Model/Resolver/Image/ImagesResolver.php
Outdated
Show resolved
Hide resolved
packages/frontend-api/src/Model/Resolver/Image/ImagesResolver.php
Outdated
Show resolved
Hide resolved
packages/frontend-api/src/Model/Resolver/Image/ImagesResolver.php
Outdated
Show resolved
Hide resolved
packages/frontend-api/src/Model/Resolver/Image/ImagesResolver.php
Outdated
Show resolved
Hide resolved
project-base/tests/FrontendApiBundle/Functional/Image/ProductImagesTest.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when I send the query bellow, API will respond with HTML of 500 error page probably caused by cached files... everything as expected
{
product(uuid: "foo") {
images {
url,
type,
size,
width,
height,
position
}
}
}
adeeeac
to
8660717
Compare