Exploring Graphs with Elixir: service contexts p.92-93

The book states “define the function graph_service/0 within the body of the using/1 macro
in the GraphCommons.Graph module”

The code download shows this:

defmacro using(opts) do
graph_type = Keyword.get(opts, :graph_type)
graph_module = Keyword.get(opts, :graph_module)

quote do

  # other (listings, new_graph) functions here

  def read_graph(graph_file),
    do: GraphCommons.Graph.read_graph(graph_file, unquote(graph_type))

  def write_graph(graph_data, graph_file),
    do: GraphCommons.Graph.write_graph(graph_data, graph_file,
    unquote(graph_type))
end

end

def graph_service(), do: unquote(graph_module)

def gs() do
graph_service()
graph_info()
end

I’ve not been able to work through the error here and obtain the result shown in the book, namely:

iex> graph_service PropertyGraph
PropertyGraph

So, no solution from me, but I sense there’s more than a one problem here

Okay, this was simply a case of moving
def graph_service(), do: unquote(graph_module)
into the macro.

The error is in the code download