You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2021/11/24 15:48:13 UTC

[GitHub] [incubator-age-viewer] david-m-m edited a comment on issue #9: can't understand query error

david-m-m edited a comment on issue #9:
URL: https://github.com/apache/incubator-age-viewer/issues/9#issuecomment-977926770


   I'm not sure why this has been closed. 
   Just for completeness here are the steps to reproduce:
   
   1. Run docker containers
   ```
   $ docker run -it -e POSTGRES_PASSWORD=svcTree --expose 5432 sorrell/apache-age
   $ docker run -ti --expose 3001 bitnine/agviewer
   ```
   Both running latest tag (as of this week, 2021-11-22)
   
   2. Create graph and some data
   ```
   SELECT * FROM create_graph('test');
   SELECT * FROM cypher('test', $$ CREATE (john:Person {name: 'John'}) $$) as (r agtype);
   SELECT * FROM cypher('test', $$ CREATE (j:Person {name: 'Jack'}) $$) as (r agtype);
   SELECT * from cypher('test', $$ MATCH (a:Person),(b:Person) WHERE a.name='John' AND b.name='Jack' CREATE (a)-[r:Friend]->(b) RETURN type(r) $$) as (r agtype);
   ```
   
   3. Open age-viewer in your browser and connect to database and graph
   4. Click on "Node Label -> Person" (Query: `SELECT * from cypher('test', $$ MATCH (V:Person) RETURN V $$) as (V agtype);` )
   This one works and just shows the two nodes (no relation)
   5. Click on "Edge Label -> Friend" (Query: `SELECT * from cypher('test', $$ MATCH (V)-[R:Friend]-(V2) RETURN V,R,V2 $$) as (V agtype, R agtype, V2 agtype);` )
   This one results in the error.
   6. Update the relation (set a property):
   `SELECT * from cypher('test', $$ MATCH (a:Person)-[r:Friend]->(b:Person) WHERE a.name='John' AND b.name='Jack' SET r.type='close' RETURN r $$) as (r agtype);`
   7. Click on "Friend" again: VoilĂ , graph shows including relation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org