Fix bulk-add layers tool

Oops, we extracted Support fields out from the default `appearanceLayerFragment`!

This was causing the page to silently fail to show any changes, because `layer.remoteId` was evaluating to `undefined` rather than one of the ID numbers in the range.

Here, I've added both `remoteId` explictly because we use it directly, and also the support fields because that's what the layer support UI needs!
This commit is contained in:
Emi Matchu 2021-04-26 06:07:52 -07:00
parent 3a4e5d7e13
commit 6918b3cefa
2 changed files with 5 additions and 1 deletions

View file

@ -19,6 +19,7 @@ import {
import { gql, useMutation, useQuery } from "@apollo/client";
import {
appearanceLayerFragment,
appearanceLayerFragmentForSupport,
itemAppearanceFragment,
petAppearanceFragment,
} from "../../components/useOutfitAppearance";
@ -246,7 +247,9 @@ function AllItemLayersSupportModalContent({
remoteIds: $layerRemoteIds
) {
id
remoteId
...AppearanceLayerForOutfitPreview
...AppearanceLayerForSupport
}
color(id: $colorId) {
@ -281,6 +284,7 @@ function AllItemLayersSupportModalContent({
}
${appearanceLayerFragment}
${appearanceLayerFragmentForSupport}
${petAppearanceFragment}
`,
{

View file

@ -226,7 +226,7 @@ export const appearanceLayerFragment = gql`
}
`;
const appearanceLayerFragmentForSupport = gql`
export const appearanceLayerFragmentForSupport = gql`
fragment AppearanceLayerForSupport on AppearanceLayer {
id
remoteId # HACK: This is for Support tools, but other views don't need it