- π·π΄Romania bogdan.racz
I've rerolled the latest patch for version 3.x
Please review.
Would be nice if we could integrate this module a bit deeper into the
GraphQL β
Module.
Currently if you use a derivative query like this:
query { entity:route(path: "/node/1") { ... on EntityCanonicalUrl { entity { entityTranslation(language: DE) { ... on NodeArticle { entityLabel fieldImage { derivative(style: THUMBNAIL) { url } } } } } } } }
You'll get a url like this: https://example.org/sites/default/files/styles/[IMAGE_STYLE]/public/2018-07/column-3.svg?itok=mhE3EI_r
but often all you need / can have is https://example.org/sites/default/files/2018-07/column-3.svg
.
The attached patch extends the existing ImageDerivative
handler from GraphQL to differ between SVG and other files.
Currently it provides its own function svg_derivative
and also hijacks the default derivative
function.
We might want to make the hijacking optional.
Reviews needed.
Decide if we'd like to make the hijacking of the default derivative
function configurable.
None.
None.
None.
Needs review
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I've rerolled the latest patch for version 3.x
Please review.