Testable version of the GraphQL transport that allows injecting mock modules.
Summary
Functions
Returns a specification to start this module under a supervisor.
Creates a new testable GraphQL transport.
Overloaded public functions that accept a transport struct as the first argument to allow direct manipulation of the transport state in tests.
Functions
@spec call_tool_stream( %ExUtcp.Transports.Graphql.Testable{ connection_module: term(), connection_timeout: term(), genserver_module: term(), logger: term(), max_retries: term(), pool_opts: term(), retry_config: term(), retry_delay: term() }, String.t(), map(), map() ) :: {:ok, map()} | {:error, term()}
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec mutation( %ExUtcp.Transports.Graphql.Testable{ connection_module: term(), connection_timeout: term(), genserver_module: term(), logger: term(), max_retries: term(), pool_opts: term(), retry_config: term(), retry_delay: term() }, map(), String.t(), map(), keyword() ) :: {:ok, map()} | {:error, term()}
@spec new(keyword()) :: %ExUtcp.Transports.Graphql.Testable{ connection_module: module(), connection_timeout: non_neg_integer(), genserver_module: module(), logger: function(), max_retries: non_neg_integer(), pool_opts: keyword(), retry_config: map(), retry_delay: non_neg_integer() }
Creates a new testable GraphQL transport.
@spec query( %ExUtcp.Transports.Graphql.Testable{ connection_module: term(), connection_timeout: term(), genserver_module: term(), logger: term(), max_retries: term(), pool_opts: term(), retry_config: term(), retry_delay: term() }, map(), String.t(), map(), keyword() ) :: {:ok, map()} | {:error, term()}
@spec register_tool_provider( %ExUtcp.Transports.Graphql.Testable{ connection_module: term(), connection_timeout: term(), genserver_module: term(), logger: term(), max_retries: term(), pool_opts: term(), retry_config: term(), retry_delay: term() }, map() ) :: {:ok, [map()]} | {:error, term()}
Overloaded public functions that accept a transport struct as the first argument to allow direct manipulation of the transport state in tests.
@spec subscription( %ExUtcp.Transports.Graphql.Testable{ connection_module: term(), connection_timeout: term(), genserver_module: term(), logger: term(), max_retries: term(), pool_opts: term(), retry_config: term(), retry_delay: term() }, map(), String.t(), map(), keyword() ) :: {:ok, [map()]} | {:error, term()}