package graph import ( "net/http" "github.com/brasse-b/archivum/internal/config" ) // NewServer wires up the HTTP handler for the GraphQL endpoint. // Replace the stub handler with the gqlgen-generated handler once // `go generate ./...` has been run. func NewServer(cfg *config.Config) http.Handler { mux := http.NewServeMux() // Placeholder — replace with generated gqlgen handler. mux.HandleFunc("/graphql", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) _, _ = w.Write([]byte(`{"data":{"systemStatus":"REQUIRE_SETUP"}}`)) }) // Simple health check. mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) }) return mux }