Skip to content

Commit e979a5a

Browse files
committed
Add reference to Apollo Client developer extension
1 parent 28fc6c2 commit e979a5a

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NODE_ENV="development"

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
- [wp-graphql-woocommerce](https://github.com/wp-graphql/wp-graphql-woocommerce) Adds Woocommerce functionality to a WPGraphQL schema.
1313
- [algolia-woo-indexer](https://github.com/w3bdesign/algolia-woo-indexer) Sends WooCommerce products to Algolia.
1414

15-
1. Make sure WooCommerce has some products already or import some sample products
15+
2. For debugging and testing, install either https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/ (Firefox) or https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm (Chrome) depending on your browser.
16+
17+
Rename .env.example to .env so the Apollo debugger will correctly load. It will not load if the NODE_ENV variable is not correctly set.
18+
19+
3. Make sure WooCommerce has some products already or import some sample products
1620

1721
The WooCommerce sample products CSV file is available at `wp-content/plugins/woocommerce/sample-data/sample_products.csv` or [Sample products](sample_products/)
1822

utils/apollo/ApolloClient.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { WOO_CONFIG } from 'utils/config/nextConfig';
2323
export const middleware = new ApolloLink((operation, forward) => {
2424
/**
2525
* If session data exist in local storage, set value as session header.
26+
* Here we also delete the session if it is older than 24 hours
2627
*/
2728
const session = process.browser ? localStorage.getItem('woo-session') : null;
2829
const sessionAge = process.browser

0 commit comments

Comments
 (0)