Documentation ¶
Index ¶
- Constants
- func CreateGatewayEngine(option Config) (*graphql.Engine, error)
- func LoadOpenApiV2orV3Doc(docLocation EndpointOptions) (*openapi3.T, error)
- func NewResolverFactory(doc *openapi3.T, options Config) (resolvers.Resolver, string, error)
- type CachedResolution
- type Config
- type Converter
- type DataLoadersKeyType
- type EndpointOptions
- type HandlerTransport
Constants ¶
View Source
const DataLoadersKey = DataLoadersKeyType("DataLoadersKey")
Variables ¶
This section is empty.
Functions ¶
func LoadOpenApiV2orV3Doc ¶
func LoadOpenApiV2orV3Doc(docLocation EndpointOptions) (*openapi3.T, error)
Types ¶
type CachedResolution ¶
type CachedResolution struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct { Openapi EndpointOptions `json:"spec,omitempty",yaml:"spec,omitempty"` APIBase EndpointOptions `json:"api,omitempty",yaml:"api,omitempty"` QueryType string MutationType string Log *log.Logger }
type DataLoadersKeyType ¶
type DataLoadersKeyType string
type EndpointOptions ¶
type EndpointOptions struct { // URL is the endpoint or endpoint base path that will be accessed. URL string `yaml:"url,omitempty" json:"url,omitempty"` // BearerToken is the Authentication Bearer token that will added to the request headers. BearerToken string `yaml:"bearer-token,omitempty" json:"bearer-token,omitempty"` // Api key for the endpoint. ApiKey string `yaml:"api-key,omitempty" json:"api-key,omitempty"` // InsecureClient allows the client request to connect to TLS servers that do not have a valid certificate. InsecureClient bool `yaml:"insecure-client,omitempty" json:"insecure-client,omitempty"` Client *http.Client `yaml:"-" json:"-"` // OpenapiDocument is the content of the openapi document, if empty it will be loaded from the URL OpenapiDocument []byte `yaml:"-" json:"-"` }
EndpointOptions defines how to access an endpoint URL
type HandlerTransport ¶
HandlerTransport is a http.RoundTripper implemented using an http.Handler bypassing the the need to go through the http/tcp stack when your http client wants to call a handler.
Click to show internal directories.
Click to hide internal directories.