load contribution link and transaction link

This commit is contained in:
ogerly 2022-06-16 14:34:30 +02:00
parent d1a26f6bff
commit ef881d94cd
3 changed files with 35 additions and 12 deletions

View File

@ -114,17 +114,35 @@ export const queryOptIn = gql`
export const queryTransactionLink = gql`
query($code: String!) {
queryTransactionLink(code: $code) {
id
amount
memo
createdAt
validUntil
redeemedAt
deletedAt
user {
firstName
publisherId
email
LinkType {
... on TransactionLink {
id
amount
memo
createdAt
validUntil
redeemedAt
deletedAt
user {
firstName
publisherId
email
}
}
... on ContributionLink {
id
validTo
validFrom
amount
name
memo
cycle
createdAt
code
link
deletedAt
maxAmountPerMonth
}
}
}
}

View File

@ -62,6 +62,7 @@ export default {
},
})
.then((result) => {
console.log(result)
this.linkData = result.data.queryTransactionLink
})
.catch((err) => {

View File

@ -29,7 +29,11 @@ const authLink = new ApolloLink((operation, forward) => {
const apolloClient = new ApolloClient({
link: authLink.concat(httpLink),
cache: new InMemoryCache(),
cache: new InMemoryCache({
possibleTypes: {
LinkType: ['TransactionLink', 'ContributionLink'],
},
}),
})
export const apolloProvider = new VueApollo({