Add moveCookieToCategory mutation
Moving a cookie between categories previously required two sequential updateCookieCategory mutations, which was not atomic and could leave data in an inconsistent state if the second call failed. This adds a dedicated moveCookieToCategory mutation that performs both updates in a single transaction. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -172,6 +172,9 @@ extend type Mutation {
|
||||
reorderCookieCategory(
|
||||
input: ReorderCookieCategoryInput!
|
||||
): ReorderCookieCategoryPayload!
|
||||
moveCookieToCategory(
|
||||
input: MoveCookieToCategoryInput!
|
||||
): MoveCookieToCategoryPayload!
|
||||
}
|
||||
|
||||
input CreateCookieBannerInput {
|
||||
@@ -238,6 +241,12 @@ input CookieItemInput {
|
||||
description: String!
|
||||
}
|
||||
|
||||
input MoveCookieToCategoryInput {
|
||||
sourceCookieCategoryId: ID!
|
||||
targetCookieCategoryId: ID!
|
||||
cookieName: String!
|
||||
}
|
||||
|
||||
type CreateCookieBannerPayload {
|
||||
cookieBannerEdge: CookieBannerEdge!
|
||||
}
|
||||
@@ -281,3 +290,9 @@ type DeleteCookieCategoryPayload {
|
||||
type ReorderCookieCategoryPayload {
|
||||
cookieBanner: CookieBanner!
|
||||
}
|
||||
|
||||
type MoveCookieToCategoryPayload {
|
||||
sourceCookieCategory: CookieCategory!
|
||||
targetCookieCategory: CookieCategory!
|
||||
cookieBanner: CookieBanner!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user