import { GraphQLClient, gql } from 'graphql-request';
const API_URL = 'https://transactional-graph.staging.fluzapp.com/api/v1/graphql';
const GET_VIRTUAL_CARD_OFFERS = gql`
query GetVirtualCardOffers {
getVirtualCardOffers(
input: { cardBrandLocked: false, cardType: DEBIT, cardNetwork: MASTERCARD }
) {
offerId
bin
bankName
rewardValue
programLimits {
dailyLimit
weeklyLimit
monthlyLimit
}
programName
}
}
`;
const client = new GraphQLClient(API_URL, {
headers: {
Authorization: `Bearer <<USER_ACCESS_TOKEN>>`,
'Content-Type': 'application/json',
},
});
const response = await client.request(GET_VIRTUAL_CARD_OFFERS);
console.log(response);