krlawrence / graph

Practical Gremlin - An Apache TinkerPop Tutorial
Apache License 2.0
830 stars 251 forks source link

Remove references to the Graph API #259

Open spmallette opened 11 months ago

spmallette commented 11 months ago

At this point, we really don't talk about using Blueprints level Graph API for doing things. Folks operate at a Gremlin level. There's some references to the Graph API in the book that should probably be removed, like: "4.5.1. Adding an airport (vertex) and a route (edge)" which adds a detracting statement of:

While using the graph object in this way works, it is strongly recommended that the traversal source object g be used instead and that vertices and edges be added using a traversal.

Not sure if there are other references to it offhand, but I think it's worth a good going over to clean that up.

krlawrence commented 11 months ago

There's also a fair bit of graph.io that now needs to be g.io both in the manuscript and some of the sample code. There are also several examples of graph.traversal() that could be reworked. The mentions in Section 2.3 where graph.features() is mentioned also needs some reworking.

Files to consider changing include

  1. https://github.com/krlawrence/graph/blob/main/sample-data/load-air-routes-graph-34.groovy
  2. https://github.com/krlawrence/graph/blob/main/sample-data/load-air-routes-graph.groovy
  3. https://github.com/krlawrence/graph/blob/ca8ca709855809c88684a4259fcfc8f069828d25/sample-data/air-routes.groovy#L28
  4. https://github.com/krlawrence/graph/blob/ca8ca709855809c88684a4259fcfc8f069828d25/book/Section-Getting-Started.adoc#L655
  5. https://github.com/krlawrence/graph/blob/ca8ca709855809c88684a4259fcfc8f069828d25/sample-code/janus-cassandra.groovy#L125
  6. https://github.com/krlawrence/graph/blob/ca8ca709855809c88684a4259fcfc8f069828d25/book/Section-Moving-Beyond.adoc#L1997
  7. https://github.com/krlawrence/graph/blob/ca8ca709855809c88684a4259fcfc8f069828d25/sample-code/janus-inmemory.groovy#L159
  8. https://github.com/krlawrence/graph/blob/ca8ca709855809c88684a4259fcfc8f069828d25/book/Section-Introducing-Gremlin-Server.adoc#L818
krlawrence commented 11 months ago

See also issue #201