Skip to content
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

[Feature Request] Additional metadata on media assets #25

Open
MRDRMUFN opened this issue Mar 24, 2020 · 2 comments
Open

[Feature Request] Additional metadata on media assets #25

MRDRMUFN opened this issue Mar 24, 2020 · 2 comments

Comments

@MRDRMUFN
Copy link

I would be great if we could query modified attribute from Gutenberg blocks which relate to images and files. Doing so would provide the ability to cache-bust assets on the front-end and would be more consistent with options available on "file fields" from the wp-graphql-acf plugin.

For example:

... on WPGraphQL_CoreImageBlock {
      attributes {
        url
        modified

would return

{
  "attribute": {
    "url": "https://example.com/foo.jpg"
    "modified": "2020-03-09 17:44:44"
  }
}
@elliotschultz
Copy link

I'm also interested in accessing more data from media assets used in WPGraphQL_CoreImageBlock.

All the relevant information (including modified time) is present in the WPGraphQL_MediaItem node for each asset.

Is there a way to easily associate WPGraphQL_CoreImageBlock with its respective WPGraphQL_MediaItem node so they're accessible when querying posts?

@pristas-peter
Copy link
Owner

I was waiting for wp-graphql changes (landed in 0.10.0) to be able to use one-to-one relationship and then add these fields the core blocks. Of course PRs are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants