indie-collective/community

Investigate why the production server needs to parse the image field

Closed this issue · 0 comments

On server.js, Graphile's derived file resolver used for images is defined like this:

resolve: (image) => {
  if (image) {
    return `https://${CDN}/${image.name}`;
  }
  return null;
},

which is fine for development, but breaks on the production server.
It needs to be https://${CDN}/${JSON.parse(image).name}. Is there a sort of auto parsing feature that I'm not aware of?