What are the open subsets of a graph viewed as a topological space? I am reading Massey's "Algebraic Topology, An Introduction", in which the following definition is given:

Let us consider finite graphs only (finite edge and vertex set). Given this definition, I am having a hard time wrapping my head around what the open sets of this topological space are. Obviously each edge is an open set, and thus any point of an edge has an open neighborhood contained in the edge. My first thought was to take a basis for each edge (thought of as the interval $(0,1) \subset \mathbb{R}$) and take the union of these bases as a basis for the graph. However, the whole graph, which is itself an open set, cannot be represented as a union of these. Could someone help me out here?
Edit: another idea is to take the previously mentioned basis together with neighborhoods of each vertex. However, condition d) says that such a neighborhood is open if and only if its intersection with the closure of each edge is open. Such a neighborhood would look like a "star" centered at the vertex, and its intersection with the closure of an edge would either be empty, or an open subset of an edge together with a vertex, which should be a half-open interval by c).
 A: Your second idea works: if you take a basis for each edge, and add "star-like" open sets for each vertex, you get a basis for the graph. For the star-like open sets, we can say that each vertex $v$ gets all points within distance $\epsilon$ along each edge incident on $v$, and call this $S_{v,\epsilon}$; then we add all the sets $S_{v,\epsilon}$ for all $v$ and all $\epsilon>0$ to the basis. (Maybe only the rational $\epsilon>0$ if you want something countable.)
Another approach: start from closed sets, instead. Then you can just say that every closed subset of every edge is a closed set, and you can get all the closed sets of the graph from there.
Another approach: embed the graph in $\mathbb R^3$. Put the vertices at distinct points in such a way that no three are collinear and no four are coplanar; one way to do this is to put them on the curve $(t,t^2,t^3)$ for distinct values of $t$. Then just make the edges be line segments between the vertices. If you do this, then at least for a finite graph, the graph topology is just the subspace topology inherited from the usual topology on $\mathbb R^3$.
