# `ExUtcp.Transports.Graphql.Testable`
[🔗](https://github.com/universal-tool-calling-protocol/elixir-utcp/blob/main/lib/ex_utcp/transports/graphql/testable.ex#L1)

Testable version of the GraphQL transport that allows injecting mock modules.

# `call_tool`

```elixir
@spec call_tool(
  %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()}
```

# `call_tool_stream`

```elixir
@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()}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `close`

# `deregister_tool_provider`

```elixir
@spec deregister_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 | {:error, term()}
```

# `introspect_schema`

```elixir
@spec introspect_schema(
  %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(),
  keyword()
) :: {:ok, map()} | {:error, term()}
```

# `mutation`

```elixir
@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()}
```

# `new`

```elixir
@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.

# `query`

```elixir
@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()}
```

# `register_tool_provider`

```elixir
@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.

# `subscription`

```elixir
@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()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
