graphQLProxy error in tutorial 'Build a Shopify App with Node and React'

New Member
4 0 0

I followed the tutorial closely and everything worked fine until setting up the GraphQL to fetch data with Apollo. Once I included the server.use(graphQLProxy({version: ApiVersion.October19})), there were errors. I had changed it to (graphQLProxy({version: ApiVersion.July20})) and (graphQLProxy({version: '2020-07'})) to reflect the latest stable API release but to no avail. Each of the api change in the script was followed with changing the api version in the app setup.

This is the error I got:

event - compiled successfully
(node:14364) UnhandledPromiseRejectionWarning: TypeError: graphQLProxy is not a function
at C:\Users\Test\Documents\ShopifyNode1\server.js:49:16
(node:14364) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see (rejection id: 1)
(node:14364) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Any ideas on how to solve it?