-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first command conversion since switching the sdk over - went well
- Loading branch information
1 parent
7e27d36
commit 3a70bf5
Showing
9 changed files
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
e2e/src/jsE2eTest/kotlin/com/zegreatrob/coupling/e2e/test/E2eSetup.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
server/src/jsMain/kotlin/com/zegreatrob/coupling/server/entity/party/DeletePartyResolver.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
package com.zegreatrob.coupling.server.entity.party | ||
|
||
import com.zegreatrob.coupling.action.party.DeletePartyCommand | ||
import com.zegreatrob.coupling.action.party.perform | ||
import com.zegreatrob.coupling.json.DeletePartyInput | ||
import com.zegreatrob.coupling.server.external.graphql.Resolver | ||
import com.zegreatrob.coupling.server.graphql.DispatcherProviders.authorizedPartyDispatcher | ||
import com.zegreatrob.coupling.server.graphql.dispatch | ||
import com.zegreatrob.coupling.server.graphql.dispatchAction | ||
import kotlinx.serialization.json.JsonNull | ||
|
||
val deletePartyResolver: Resolver = dispatch( | ||
val deletePartyResolver: Resolver = dispatchAction( | ||
dispatcherFunc = { request, _: JsonNull, args -> | ||
authorizedPartyDispatcher( | ||
context = request, | ||
partyId = args.partyId.value, | ||
) | ||
}, | ||
queryFunc = { _, input: DeletePartyInput -> DeletePartyCommand(input.partyId) }, | ||
commandFunc = { _, input: DeletePartyInput -> DeletePartyCommand(input.partyId) }, | ||
fireFunc = ::perform, | ||
toSerializable = { true }, | ||
) |