My code
import { gql } from 'apollo-boost'
const UPDATE_SKU = gql`
mutation UpdateSku(
$id: ID!
$salePrice: Int!
$promotionalPrice: Int!
$quantity: Int!
$package: JSON!
) {
updateSku (
id: $id
salePrice: $salePrice
promotionalPrice: $promotionalPrice
quantity: $quantity
package: {
height: $height
}
) {
id
}
}
`
export { UPDATE_SKU }
I'm using useMutation
to apply this change to my database with graphql
, but the package is of the JSON
type
How should I proceed when the type is json?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…