graphql

package
v0.0.0-...-84db50f Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package graphql provides GraphQL upstream integration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGraphQLUpstream

func NewGraphQLUpstream() upstream.Upstream

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.

func (*Callable) Call

func (c *Callable) Call(ctx context.Context, req *tool.ExecutionRequest) (any, error)

Call executes the GraphQL query.

Parameters:

  • ctx (context.Context): The context for the request.
  • req (*tool.ExecutionRequest): The parameter.

Returns:

  • any: The result.
  • error: An error if the operation fails.

Errors:

  • Returns an error if ...

Side Effects:

  • None.

type Upstream

type Upstream struct{}

Upstream implements the upstream.Upstream interface for GraphQL services.

func (*Upstream) Register

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

func (*Upstream) Shutdown

func (g *Upstream) Shutdown(_ context.Context) error

Shutdown shuts down the upstream.

Parameters:

  • _ (context.Context): The parameter.

Returns:

  • error: An error if the operation fails.

Errors:

  • Returns an error if ...

Side Effects:

  • None.

Jump to

Keyboard shortcuts

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