import { GraphQLClient, gql } from 'graphql-request';
const API_URL = 'https://transactional-graph.fluzapp.com/api/v1/graphql';
const REQUEST_DOC_VERIFICATION = gql`
mutation RequestDocumentVerificationLink($input: RequestDocumentVerificationLinkInput!) {
requestDocumentVerificationLink(input: $input) {
userId
verificationType
verificationId
verificationUrl
status
message
}
}
`;
const client = new GraphQLClient(API_URL, {
headers: {
Authorization: `Bearer <<USER_ACCESS_TOKEN>>`,
'Content-Type': 'application/json',
},
});
const response = await client.request(REQUEST_DOC_VERIFICATION, {
input: {
gaveConsent: true,
prefillData: true,
},
});
console.log(response);