# `Grax`
[🔗](https://github.com/rdf-elixir/grax/blob/v0.6.1/lib/grax/grax.ex#L1)

The Grax API.

For now there is no API documentation.
Read about the API in the guide [here](https://rdf-elixir.dev/grax/api.html).

# `add_additional_statements`

```elixir
@spec add_additional_statements(Grax.Schema.t(), RDF.Description.input()) ::
  Grax.Schema.t()
```

# `additional_statements`

```elixir
@spec additional_statements(Grax.Schema.t()) :: RDF.Description.t()
```

# `build`

# `build`

# `build!`

# `build!`

# `build_id`

# `clear_additional_statements`

```elixir
@spec clear_additional_statements(Grax.Schema.t(), opts :: keyword()) ::
  Grax.Schema.t()
```

# `delete_additional_predicates`

```elixir
@spec delete_additional_predicates(
  Grax.Schema.t(),
  RDF.Statement.coercible_predicate() | [RDF.Statement.coercible_predicate()]
) :: Grax.Schema.t()
```

# `delete_additional_statements`

```elixir
@spec delete_additional_statements(Grax.Schema.t(), RDF.Description.input()) ::
  Grax.Schema.t()
```

# `id`

Returns the id of a Grax struct.

This should be the preferred over accessing the `:__id__` field directly.

## Example

    iex> user = Example.User.build!(EX.User, name: "John Doe")
    ...> Grax.id(user)
    ~I<http://example.com/User>

# `id_schema`

# `load`

# `load`

# `load`

# `load!`

# `load!`

# `load!`

# `normalize_preload_opt`

# `preload`

# `preload!`

# `preloaded?`

# `preloaded?`

# `put`

# `put`

# `put!`

# `put!`

# `put_additional_statements`

```elixir
@spec put_additional_statements(Grax.Schema.t(), RDF.Description.input()) ::
  Grax.Schema.t()
```

# `reset_id`

```elixir
@spec reset_id(Grax.Schema.t()) :: Grax.Schema.t()
```

Resets the id of the given Grax schema `struct` by reapplying its `Grax.Id.Schema`.

# `reset_id`

```elixir
@spec reset_id(Grax.Schema.t(), RDF.Resource.coercible()) :: Grax.Schema.t()
```

Resets the id of the given Grax schema `struct` to the given `id`.

This should always be preferred over setting the `__id__` field directly.

# `schema`

```elixir
@spec schema(RDF.IRI.coercible()) :: module() | [module()] | nil
```

# `setup_depth_preload_opts`

# `to_rdf`

```elixir
@spec to_rdf(Grax.Schema.t(), opts :: keyword()) ::
  {:ok, RDF.Graph.t()} | {:error, any()}
```

# `to_rdf!`

```elixir
@spec to_rdf!(Grax.Schema.t(), opts :: keyword()) :: RDF.Graph.t()
```

# `valid?`

```elixir
@spec valid?(Grax.Schema.t(), opts :: keyword()) :: boolean()
```

# `validate`

```elixir
@spec validate(Grax.Schema.t(), opts :: keyword()) ::
  {:ok, Grax.Schema.t()} | {:error, Grax.ValidationError.t()}
```

# `validate!`

```elixir
@spec validate!(Grax.Schema.t(), opts :: keyword()) :: Grax.Schema.t()
```

---

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