Unable to access collection hook fields through the graphql API. Any workarounds? #392
richardvanbergen
started this conversation in
Feature Requests & Ideas
Replies: 1 comment 3 replies
-
Hey @richardvanbergen — I see the issue here. Question for you. I recall that we added the Alternatively, we could come up with some type of API that lets you merge in or provide your own fields to the What do you think? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently,
payload-plugin-cloud-storage
uses a collectionafterRead
hook to add the cloud URL to both the main document and thesizes
. I wasn't using the graphQL in production so I didn't notice but this method means that it's not available through the GraphQL api.I could add a virtual field and a field hook but then I can't adjust the
sizes
array. I can think of a couple of horrible workarounds like storing them all as JSON but I can't think of a clean implementation. Any suggestions?Beta Was this translation helpful? Give feedback.
All reactions