mirror of
https://github.com/friebetill/TubeCards.git
synced 2025-08-16 11:21:56 +08:00
43 lines
859 B
GraphQL
43 lines
859 B
GraphQL
# import '../fragments/deck_fragment.graphql'
|
|
|
|
mutation UpsertDeck(
|
|
$id: ID
|
|
$name: String!
|
|
$description: String!
|
|
$createMirrorCard: Boolean!
|
|
$unsplashId: String!
|
|
$authorName: String!
|
|
$authorUrl: String!
|
|
$regularUrl: String!
|
|
$smallUrl: String!
|
|
$fullUrl: String!
|
|
$frontLanguage: String
|
|
$backLanguage: String
|
|
) {
|
|
upsertUnsplashImage(
|
|
where: { unsplashId: $unsplashId }
|
|
create: {
|
|
unsplashId: $unsplashId
|
|
authorName: $authorName
|
|
authorUrl: $authorUrl
|
|
regularUrl: $regularUrl
|
|
smallUrl: $smallUrl
|
|
fullUrl: $fullUrl
|
|
}
|
|
update: {}
|
|
) {
|
|
id
|
|
}
|
|
upsertDeck(
|
|
id: $id
|
|
name: $name
|
|
description: $description
|
|
createMirrorCard: $createMirrorCard
|
|
unsplashImageId: $unsplashId
|
|
frontLanguage: $frontLanguage
|
|
backLanguage: $backLanguage
|
|
) {
|
|
...DeckFragment
|
|
}
|
|
}
|