github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/pkg/platform/api/graphql/graphql.go (about)

     1  package graphql
     2  
     3  import (
     4  	"github.com/ActiveState/cli/internal/gqlclient"
     5  	"github.com/ActiveState/cli/pkg/platform/api"
     6  	"github.com/ActiveState/cli/pkg/platform/authentication"
     7  )
     8  
     9  func New(auth *authentication.Auth) *gqlclient.Client {
    10  	url := api.GetServiceURL(api.ServiceGraphQL)
    11  	c := gqlclient.New(url.String(), 0)
    12  	c.SetTokenProvider(auth)
    13  	return c
    14  }