diff --git a/scripts/graphql.js b/scripts/graphql.js index 3c0e420e..c4d733f4 100644 --- a/scripts/graphql.js +++ b/scripts/graphql.js @@ -5,33 +5,6 @@ import { logError } from './scripts.js'; const baseApiUrl = `${await getGraphqlEndpoint()}/graphql/execute.json`; const projectId = 'gmo'; -/* -export async function graphqlQueryNameList(queryNameList) { - const queryName = queryNameList; - //persisted query URLs have to be encoded together with the first semicolon - const graphqlEndpoint = `${baseApiUrl}/${projectId}/${queryName}`; - const jwtToken = await getBearerToken(); - - // Return the fetch promise chain so that it can be awaited outside - return fetch(graphqlEndpoint, { - method: 'GET', - headers: { - Authorization: jwtToken, - }, - }).then(response => { - if (!response.ok) { - throw new Error(`HTTP error! Status: ${response.status}`); - } - return response.json(); - }).then(data => { - return data; // Make sure to return the data so that the promise resolves with it - }).catch(error => { - console.error('Error fetching data: ', error); - throw error; // Rethrow or handle error as appropriate - }); -} -*/ - export async function graphqlCampaignCount(filter = {}) { const queryName = 'getTotalPrograms'; const encodedSemiColon = encodeURIComponent(';'); @@ -215,10 +188,4 @@ export async function executeQuery(queryString) { console.error('Error fetching data: ', error); throw error; // Rethrow or handle error as appropriate }); -}; - -export async function getMapping(mappingPath) { - - - -} \ No newline at end of file +}; \ No newline at end of file