import { GraphQLClient, gql } from 'graphql-request';
const API_URL = 'https://transactional-graph.staging.fluzapp.com/api/v1/graphql';
const LOCK_VIRTUAL_CARD = gql`
mutation LockVirtualCard {
lockVirtualCard(
input: { virtualCardId: "cc7eaf27-1560-425c-92c4-bdc88d45d261" }
) {
virtualCardId
locked
}
}
`;
const client = new GraphQLClient(API_URL, {
headers: {
Authorization: `Bearer <<USER_ACCESS_TOKEN>>`,
'Content-Type': 'application/json',
},
});
const response = await client.request(LOCK_VIRTUAL_CARD);
console.log(response);
EDIT_VIRTUALCARD.