From b809f51c10c8486acc690a374b55011bf250e729 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Thu, 5 Sep 2024 20:49:40 -0400 Subject: [PATCH] comment cleanup --- packages/cli/src/data/queries.js | 46 +------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/packages/cli/src/data/queries.js b/packages/cli/src/data/queries.js index f4b5f153a..866e296f8 100644 --- a/packages/cli/src/data/queries.js +++ b/packages/cli/src/data/queries.js @@ -19,48 +19,4 @@ async function getContentByRoute(route = '') { .filter(page => page?.route.startsWith(route)); } -export { getContent, getContentByCollection, getContentByRoute }; -// import { getQueryHash } from './common.js'; - -// const client = { -// query: (params) => { -// const { query, variables = {} } = params; - -// return fetch('http://localhost:4000/graphql', { -// method: 'POST', -// headers: { -// 'Content-Type': 'application/json', -// 'Accept': 'application/json' -// }, -// body: JSON.stringify({ -// query, -// variables -// }) -// }).then((response) => response.json()); -// } -// }; - -// const APOLLO_STATE = globalThis.__APOLLO_STATE__; // eslint-disable-line no-underscore-dangle -// const BASE_PATH = globalThis.__GWD_BASE_PATH__; // eslint-disable-line no-underscore-dangle -// const backupQuery = client.query; - -// client.query = (params) => { -// if (APOLLO_STATE) { -// // __APOLLO_STATE__ defined, in production mode -// const queryHash = getQueryHash(params.query, params.variables); -// const cachePath = `${BASE_PATH}/${queryHash}-cache.json`; - -// return fetch(cachePath) -// .then(response => response.json()) -// .then((response) => { -// return { -// data: response -// }; -// }); -// } else { -// // __APOLLO_STATE__ NOT defined, in development mode -// return backupQuery(params); -// } -// }; - -// export default client; \ No newline at end of file +export { getContent, getContentByCollection, getContentByRoute }; \ No newline at end of file