Categorygithub.com/hamidfzm/go-altair
modulepackage
1.0.0
Repository: https://github.com/hamidfzm/go-altair.git
Documentation: pkg.go.dev

# README

go-altair

Altair GraphQL Client Go HTTP Handler

Lint Test

Installation

go get github.com/hamidfzm/go-altair

Usage

package main

import (
	"net/http"
)

func main() {
	config := &altair.Config{
		DefaultWindowTitle: "Mafia Altair",
		Endpoint:           endpoint,
		Force:              false,
		Headers: []altair.Header{
			{
				Key:   echo.HeaderAuthorization,
				Value: "Bearer <token>",
			},
		},
	}
	http.Handle("/altair", altair.Handler(config))
	http.ListenAndServe(":8080", nil)
}

License

Check LICENSE file for more information.

# Functions

EchoHandler returns an echo.HandlerFunc that serves the Altair GraphQL IDE.
Handler returns an http.HandlerFunc that serves the Altair GraphQL IDE.

# Structs

Config is the configuration for the Altair GraphQL IDE.
Header is a key-value pair of HTTP headers.