Skip to content

with()

You can use the with() function to determine what kind of relations data will be fetched with the original resource.

ts
import api from "axe-api-client";

// ...
const response = api
  .resource("orders")
  .with("user")
  .with("book{name,author{name}}")
  .paginate();
  • path: The relation path.

TIP

You can use multiple times this function for a query.

INFO

You should call the resource() function before using this function.

INFO

You should call the paginate() function after using this function.

Released under the MIT License.