A Spatial Logic for Querying Graphs