v0.12.2: Allow getMediasByTag to GraphQL or data access (#1020)
raiym
released this
24 Jan 08:17
Upgrading a project to php 8 I lost the functionality of `getMediasByTag()` only ever getting a empty array. It looks like a PR changed the array key from ['graphql'] to ['data'] yet 'data' doesn't exist on the responses I get, while 'graphql' does.
On the potential that the response might A) differ from time to time or B) somehow be different based on the request origin or something (i.e. I can't prove ['data'] doesn't work for others, while my ['graphql'] doesn't) I propose the following fallback 'reversion' - check for the existence of ['graphql'] then try ['data'] if it's not found.