Documentation
¶
Overview ¶
Package graphql provides GraphQL upstream integration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGraphQLUpstream ¶
NewGraphQLUpstream creates a new GraphQL upstream.
Returns:
- upstream.Upstream: The result.
Side Effects:
- None.
Types ¶
type Callable ¶
type Callable struct {
// contains filtered or unexported fields
}
Callable implements the Callable interface for GraphQL queries.
type Upstream ¶
type Upstream struct{}
Upstream implements the upstream.Upstream interface for GraphQL services.
func (*Upstream) Register ¶
func (g *Upstream) Register( ctx context.Context, serviceConfig *configv1.UpstreamServiceConfig, toolManager tool.ManagerInterface, _ prompt.ManagerInterface, _ resource.ManagerInterface, _ bool, ) (string, []*configv1.ToolDefinition, []*configv1.ResourceDefinition, error)
Register inspects the GraphQL upstream service and registers its capabilities. ctx is the context for the request. serviceConfig is the serviceConfig. toolManager is the toolManager. _ is an unused parameter. _ is an unused parameter. _ is an unused parameter. Returns the result. Returns the result. Returns the result. Returns an error if the operation fails.
Parameters:
- ctx (context.Context): The context for the request.
- serviceConfig (*configv1.UpstreamServiceConfig): The serviceConfig parameter.
- toolManager (tool.ManagerInterface): The toolManager parameter.
- _ (prompt.ManagerInterface): The _ parameter.
- _ (resource.ManagerInterface): The _ parameter.
- _ (bool): The _ parameter.
Returns:
- string: The resulting string.
- []*configv1.ToolDefinition: The resulting []*configv1.ToolDefinition.
- []*configv1.ResourceDefinition: The resulting []*configv1.ResourceDefinition.
- error: An error if the operation fails.
Errors:
- Returns an error if the operation fails or is invalid.
Side Effects:
- None