Replace imageUrl with imageUrlV2 in-app

Should be a smooth drop-in replacement, we give the field an alias `imageUrl` in the query, so the rest of the app is none the wiser!

I didn't test the layer upload cache invalidation, but it seems pretty obvious to me, so ehh I'm just shipping it lmao
This commit is contained in:
Emi Matchu 2022-10-12 12:41:27 -07:00
parent 7bef1f3b9a
commit 5e6939309a
3 changed files with 6 additions and 2 deletions

View file

@ -125,6 +125,10 @@ function AppearanceLayerSupportUploadModal({ item, layer, isOpen, onClose }) {
id: `AppearanceLayer:${layer.id}`, id: `AppearanceLayer:${layer.id}`,
fieldName: "imageUrl", fieldName: "imageUrl",
}); });
apolloClient.cache.evict({
id: `AppearanceLayer:${layer.id}`,
fieldName: "imageUrlV2",
});
} catch (e) { } catch (e) {
setIsUploading(false); setIsUploading(false);
setUploadError(e); setUploadError(e);

View file

@ -54,7 +54,7 @@ function PosePickerSupport({
bodyId bodyId
swfUrl swfUrl
svgUrl svgUrl
imageUrl(size: SIZE_600) imageUrl: imageUrlV2(idealSize: SIZE_600)
canvasMovieLibraryUrl canvasMovieLibraryUrl
} }
restrictedZones { restrictedZones {

View file

@ -123,7 +123,7 @@ export const appearanceLayerFragment = gql`
id id
svgUrl svgUrl
canvasMovieLibraryUrl canvasMovieLibraryUrl
imageUrl(size: SIZE_600) imageUrl: imageUrlV2(idealSize: SIZE_600)
bodyId bodyId
knownGlitches # For HTML5 & Known Glitches UI knownGlitches # For HTML5 & Known Glitches UI
zone { zone {