import { GraphQLClient, gql } from 'graphql-request';
const API_URL = 'https://transactional-graph.staging.fluzapp.com/api/v1/graphql';
const SET_VIRTUAL_CARD_PIN = gql`
mutation SetVirtualCardPIN {
setVirtualCardPIN(input: { pin: "1234" }) {
success
pinError
}
}
`;
const client = new GraphQLClient(API_URL, {
headers: {
Authorization: `Bearer <<USER_ACCESS_TOKEN>>`,
'Content-Type': 'application/json',
},
});
const response = await client.request(SET_VIRTUAL_CARD_PIN);
console.log(response);
CREATE_VIRTUALCARD scope。