mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
next try of graphql mutation
This commit is contained in:
parent
34be808472
commit
7561025c99
@ -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
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
`
|
||||
*/
|
||||
|
||||
@ -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 ...`,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user