I’m writing a small app that involves allowing a user to upload an image to the media library through the graphql API. The flow that had been working was as follows:
- stagedUploadsCreate mutation
- fileCreate mutation, returning the createdAt value
- files query, using the returned createdAt value to retrieve the image object for the file that had been uploaded - files (first: 1, query:“created_at:‘${createdAt}’”) {
The flow had been working, but after the DST change on 3/13/22 it began returning the wrong image. After upping the ‘first’ value to 10, I was able to see that the created_at filter had stopped respecting the time portion of timestamps and began returning all results from the date instead, beginning with the earliest from the day.
So for example, a timestamp of ‘2022-03-15T19:19:23Z’ now returns all results from 2022-03-15, beginning with ‘2022-03-15T15:31:12Z’. I am able to verify that that exact timestamp is present in the list of results, but it’s no longer returning as the first or only result.
Has there been some change to the way the query filters work so that it’s no longer capable of matching an exact timestamp value for created_at, or perhaps did the daylight savings time change introduce a bug into the internal API logic? For now, I’ve changed the code to write the file to the media library with the name set to a guid and am querying by that instead, but we would prefer to retain the more friendly human-readable filename of whatever the user chose to upload instead if it’s possible to resolve this issue.
Thanks,
John