-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fetch data for PDP #75
Conversation
* master: fix: helmet name undefined
* master: (21 commits) update jsdoc grammer add adding observable docs jsdocs Update test snapshots Add inventory status badges to variants/options lists. move comments into jsdoc in each file add links to files add definition location Add Badge component test add UIStore docs add authstore docs formatting update docs link add mobx documentation Add theme provider to ProductGrid Add sale and bestseller badge types. Fix SSR caching issue Upgrade apollo and MUI dependencies. Refactor inventory status determination to utility functions. ...
@jshimko How close are we to having this PR be ready for review? |
* master: Testing docs updated snapshot package update testing docs snapshop update lint fixes revert image sizes since we aren't using different grid sizes remove test data from React Helmet tests add container to the grid to keep it constrained to 1440px add breakpoints for image sizing add CSS in JS reference link add image docs
This is still depending on the catalog schema PR in the main Reaction repo (reactioncommerce/reaction#4218), but it's ready to be tested/reviewed.
Then start up this PR branch and everything should work. You should see the PDP is now completely populated by the GraphQL API data. |
* master: (38 commits) Fix eslint error Correct typo Fix typos fix: remove extra bracket docs: fix method name test: fix typo feat: enable paganation for tag page product grid fix: add proptype definition for pageInfo refactor: shallow render route refactor: fix typos refactor: make prop required test: update snapshot test: add page info to test refactor: increase page limit to match reaction default refactor: add pageInfo prop and guard refactor: make pageInfo required test: add PageStepper test snapshots test: add PageStepper test refactor: remove with theme refactor: put space between previous and next buttons ... # Conflicts: # src/containers/catalog/catalogItems.gql # src/containers/catalog/withCatalogItems.js
src/lib/apollo/initApolloServer.js
Outdated
if (graphQLErrors) { | ||
graphQLErrors.forEach(({ message, locations, path }) => { | ||
// eslint-disable-next-line no-console | ||
console.log(`[GraphQL error]: Message: ${message}, Location: ${JSON.stringify(locations)}, Path: ${JSON.stringify(path)}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we use the logger util for something like this?
https://github.com/reactioncommerce/reaction-next-starterkit/blob/master/src/lib/logger/index.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, maybe... but that logger is using chalk
(for terminal colors) and these particular errors can happen on the server and the client. I think we probably need a more isomorphic solution for this use case. We could certainly use Bunyan for that. Then we'd have all of the same API's we're used to in Reaction (for piping logs to other places, etc).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I wasn't sure if our lib/logger
would work in these cases. I'm good with just doing the console.error
here for now and maybe we revisit our logger soon in another PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this is looking good, had no problem getting it to work with the new catalog updates in RC.
I have a question about some logging and once that's resolved I'll merge.
Great work @jshimko
@nnnnat FYI, it's hidden in the Github UI now because I pushed changes, but I did respond to the logging questions. |
This PR relies on reactioncommerce/reaction#4218 to work (which should hopefully be merged soon)
Updates: