@@ -163,6 +163,14 @@ export const DeckDocument = graphql(`
163163 cardName
164164 }
165165 }
166+ tags {
167+ id
168+ name
169+ color
170+ targetCount
171+ position
172+ cardCount
173+ }
166174 deckCards(first: 500, after: $deckCardsAfter) {
167175 pageInfo {
168176 endCursor
@@ -175,6 +183,7 @@ export const DeckDocument = graphql(`
175183 zone
176184 finish
177185 tag
186+ tagIds
178187 priceCents
179188 card {
180189 id
@@ -339,6 +348,89 @@ export const UpdateDeckCardsTagDocument = graphql(`
339348 }
340349` )
341350
351+ export const CreateDeckTagDocument = graphql ( `
352+ mutation CreateDeckTag($deckId: ID!, $input: DeckTagInput!) {
353+ createDeckTag(deckId: $deckId, input: $input) {
354+ deckTag {
355+ id
356+ name
357+ color
358+ targetCount
359+ position
360+ cardCount
361+ }
362+ }
363+ }
364+ ` )
365+
366+ export const UpdateDeckTagDocument = graphql ( `
367+ mutation UpdateDeckTag($id: ID!, $input: DeckTagInput!) {
368+ updateDeckTag(id: $id, input: $input) {
369+ deckTag {
370+ id
371+ name
372+ color
373+ targetCount
374+ position
375+ cardCount
376+ }
377+ }
378+ }
379+ ` )
380+
381+ export const DeleteDeckTagDocument = graphql ( `
382+ mutation DeleteDeckTag($id: ID!) {
383+ deleteDeckTag(id: $id) {
384+ deckTagId
385+ }
386+ }
387+ ` )
388+
389+ export const ReorderDeckTagsDocument = graphql ( `
390+ mutation ReorderDeckTags($deckId: ID!, $tagIds: [ID!]!) {
391+ reorderDeckTags(deckId: $deckId, tagIds: $tagIds) {
392+ tags {
393+ id
394+ name
395+ color
396+ targetCount
397+ position
398+ cardCount
399+ }
400+ }
401+ }
402+ ` )
403+
404+ export const AssignDeckCardTagDocument = graphql ( `
405+ mutation AssignDeckCardTag($deckCardId: ID!, $tagId: ID!) {
406+ assignDeckCardTag(deckCardId: $deckCardId, tagId: $tagId) {
407+ deckCard {
408+ id
409+ tagIds
410+ }
411+ deckTags {
412+ id
413+ cardCount
414+ }
415+ }
416+ }
417+ ` )
418+
419+ export const UnassignDeckCardTagDocument = graphql ( `
420+ mutation UnassignDeckCardTag($deckCardId: ID!, $tagId: ID!) {
421+ unassignDeckCardTag(deckCardId: $deckCardId, tagId: $tagId) {
422+ deckCard {
423+ id
424+ tagIds
425+ }
426+ deckTags {
427+ id
428+ cardCount
429+ }
430+ }
431+ }
432+ ` )
433+
342434export const OptimizeDeckCardPrintingsDocument = graphql ( `
343435 mutation OptimizeDeckCardPrintings($deckCardIds: [ID!]!) {
344436 optimizeDeckCardPrintings(deckCardIds: $deckCardIds) {
0 commit comments