It's important to note that barf is only focused on being a framework for building JSON API only. GraphQL, of course, is a query language that supports JSON hence the need to allow BARF to support it.
Naturally, most frameworks need not do anything special for GraphQL to work but because BARF does not expose any application instance, it becomes very much necessary that we implement a way to hook in resolvers and type defs onto the barf root handler.
It's important to note that barf is only focused on being a framework for building JSON API only. GraphQL, of course, is a query language that supports JSON hence the need to allow BARF to support it.
Naturally, most frameworks need not do anything special for GraphQL to work but because BARF does not expose any application instance, it becomes very much necessary that we implement a way to hook in resolvers and type defs onto the barf root handler.