Skip to content

Commit

Permalink
comment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Sep 6, 2024
1 parent 0ac6698 commit b809f51
Showing 1 changed file with 1 addition and 45 deletions.
46 changes: 1 addition & 45 deletions packages/cli/src/data/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
export { getContent, getContentByCollection, getContentByRoute };

0 comments on commit b809f51

Please sign in to comment.