add support for FROM NAMED
refactor: only put bracess if pattern.has_context (i.e GRAPH statement)