Scratching my bald head here. I am building am app using Expo, react native and tsx.
I am using Hygraph as my CMS and Apollo Client. The below mutation works well and everything gets stored in the CMS and published.
The problem is that the image gets stored and not published. It says in the draft state. Anyone ever managed to do this successfully?
mutation AddReview(
$businessId: ID!
$userId: String!
$uploadUrl: String!
$userName: String!
$rating: Int!
$comment: String!
) {
createReview(
data: {
business: { connect: { id: $businessId } }
userId: $userId
userName: $userName
userImage: { create: { uploadUrl: $uploadUrl } }
rating: $rating
comment: $comment
}
) {
id
}
publishManyReviewsConnection {
edges {
node {
id
}
}
}
publishManyAssetsConnection {
edges {
node {
id
}
}
}
}