cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Having trouble establish connection between Yelp sandbox and Web App on codesandbox

As I was following the instruction of the Yelp online training example, I am having trouble establish connection between Yelp sandbox and the web app. !

Screen Shot 2020-08-20 at 5.46.30 PM|675x275

I have cut and pasted both the websocket Bolt URL and password to .env

Screen Shot 2020-08-20 at 5.47.54 PM|690x120

Still, I can't fetch user info as instructed.

Much appreciate if someone could give me a hand.

Thanks!

5 REPLIES 5

Hello @wen.kao and welcome to our Community!

We are looking into this problem - we have been able to reproduce what you are seeing also.

Elaine

There seems to be a problem with the Neo4j Cypher runtime and the query in exercise0.js.

The query should be changed to:

MATCH (u:User {id: $userId})
MATCH (u)-[:WROTE]->(r:Review)
WITH u, avg(r.stars) AS averageStars
MATCH (u)-[:WROTE]->(:Review)-[:REVIEWS]->(:Business)-[:IN_CATEGORY]-(c:Category)
WITH u,averageStars, c.name AS category, COUNT(*) AS num ORDER BY num DESC
RETURN u {
.name,
numReviews: toFloat(SIZE((u)-[:WROTE]->(:Review))),
categories: COLLECT(category)[..5],
averageStars
} AS userInfo

You are right. I also ran into this issue a week ago. (Applied Graph Algorithms - Cypher Refresher problem with getting User data)

There are some other small problems but currently I do not have time to solve them. If you stumble onto one, don't bang your head, ask

Srdjan

Thank you, Elaine & Srdjan. Followed the correction Elaine provided, I am able to fetch the user info now.

We have updated the course code so that when you instantiate the code sandbox, the Cypher code will be correct. There was a change in Cypher that exposed this problem and engineering is looking at it, but for now the new code should work.

Elaine