avgql

package
v0.0.31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotAuthenticated = errors.New(
	"You are not logged in to Aviator. Please verify that your API token is correct.",
)

Functions

func NewClient

func NewClient() (*graphql.Client, error)

Types

type ViewerSubquery added in v0.0.23

type ViewerSubquery struct {
	Viewer struct {
		Email    graphql.String `graphql:"email"`
		FullName graphql.String `graphql:"fullName"`
	}
}

ViewerSubquery is a GraphQL query that fetches the viewer's email and full name. It's meant to be embedded into other queries to check if the user is authenticated via the CheckViewer method.

func (ViewerSubquery) CheckViewer added in v0.0.23

func (v ViewerSubquery) CheckViewer() error

CheckViewer checks whether or not the viewer is authenticated. It returns ErrNotAuthenticated if the viewer is not authenticated.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL