Make ImageDerivative configurable to return additional properties#1122
Open
chasinhues wants to merge 1 commit into
Open
Make ImageDerivative configurable to return additional properties#1122chasinhues wants to merge 1 commit into
chasinhues wants to merge 1 commit into
Conversation
ImageDerivative configurable to return additional properties
ImageDerivative configurable to return additional propertiesChange field name to id Make plugin configurable to return additional properties Remove id from return Add ID back to return
83a0982 to
b01c848
Compare
|
tried it I got a : TypeError: Argument 1 passed to Drupal\graphql\Plugin\GraphQL\DataProducer\Entity\Fields\Image\ImageDerivative::resolve() must implement interface Drupal\file\FileInterface or be null, instance of Drupal\media\Entity\Media given in Drupal\graphql\Plugin\GraphQL\DataProducer\Entity\Fields\Image\ImageDerivative->resolve() (line 91 of modules/contrib/graphql/src/Plugin/GraphQL/DataProducer/Entity/Fields/Image/ImageDerivative.php). |
|
that information is on the image. seems a bit strange to put it on this level, can't you get that elsewhere? I actually came here looking for a way to not return image/width as it can be expensive to calculate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1120
Usage
Use
ImageDerivativeto extract extra properties fromFileentities such asfilename,uri,filemime, etc. See Drupal's File entity for full list offield_name's that can be used.Example