This proposed code does not work with graphql4.
It does work with the pre-2.0 Poll and gql3.
Looking at the code, I'm guessing it's going to be better to use schema extensions and data producers rather than creating its own Entity and adding fields to polls like the current implementation does.
It'd be nice to be compatible with graphql_core_schema as well (there's core_compose as well, but my project is using core_schema).
I'd like to see this feature. When using search API via headless Drupal, we can only get the URL to a media field right now, like for a search teaser image.
There's no clear way to get a URL for an image style from search results data which would be useful for a headless frontend.