next try of graphql mutation

This commit is contained in:
Claus-Peter Huebner 2023-09-21 16:11:00 +02:00
parent 34be808472
commit 7561025c99
3 changed files with 23 additions and 23 deletions

View File

@ -1,6 +1,6 @@
import { ArgsType, Field } from 'type-graphql'
import { Field, ObjectType } from 'type-graphql'
@ArgsType()
@ObjectType()
export class SendCoinsResult {
constructor() {
this.vote = false

View File

@ -1,6 +1,16 @@
import { gql } from 'graphql-request'
export const voteForSendCoins = gql`
mutation ($args: SendCoinsArgs!) {
voteForSendCoins(data: $args) {
vote
recipGradidoID
recipName
}
}
`
/*
mutation (
$recipientCommunityUuid: String!
$recipientUserIdentifier: String!
@ -12,18 +22,20 @@ export const voteForSendCoins = gql`
$senderUserName: String!
) {
voteForSendCoins(
recipientCommunityUuid: $recipientCommunityUuid
recipientUserIdentifier: $recipientUserIdentifier
creationDate: $creationDate
amount: $amount
memo: $memo
senderCommunityUuid: $senderCommunityUuid
senderUserUuid: $senderUserUuid
senderUserName: $senderUserName
data: {
recipientCommunityUuid: $recipientCommunityUuid
recipientUserIdentifier: $recipientUserIdentifier
creationDate: $creationDate
amount: $amount
memo: $memo
senderCommunityUuid: $senderCommunityUuid
senderUserUuid: $senderUserUuid
senderUserName: $senderUserName
}
) {
vote
recipGradidoID
recipName
}
}
`
*/

View File

@ -23,18 +23,6 @@ export class SendCoinsResolver {
async voteForSendCoins(
@Arg('data')
args: SendCoinsArgs,
/*
{
recipientCommunityUuid,
recipientUserIdentifier,
creationDate,
amount,
memo,
senderCommunityUuid,
senderUserUuid,
senderUserName,
}
*/
): Promise<SendCoinsResult> {
logger.debug(
`voteForSendCoins() via apiVersion=1_0 ...`,