Files
TubeCards/lib/graphql/mutations/upsert_deck.graphql
friebetill 80f218097d Initial commit
Add Space version 2.0.1
2022-03-28 14:56:00 +02:00

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
}
}