@@ 74,11 74,18 @@ func NewServer(service string, conf ini.File) *Server {
return server
}
-// Returns the chi Router being used for this sever.
+// Returns the chi Router being used for this sever. All routes on this router
+// require authentication.
func (server *Server) Router() chi.Router {
return server.router
}
+// Returns the chi Router being used for this sever. All routes on this server
+// are unauthenticated.
+func (server *Server) AnonRouter() chi.Router {
+ return server.root
+}
+
// Adds a GraphQL schema for this server. The second parameter shall be the
// list of scopes, as strings, which are supported by this schema. This
// function configures routes for the router; all middlewares must be