with=user
:
{
"data": [
{
"id": 24,
"user_id": 5,
"name": "Lowe, Farrell and Leuschke",
...omitted all other fields
"user": {
"id": 5,
"name": "Tierra Osinski",
"email": "4@cirqll.nl",
...omitted all other fields
}
},
{
...omitted all fields
}
],
"limit": 100,
"total": 2,
"offset": 0
}
{
"data": [
{
"id": 24,
"user_id": 5,
"name": "Lowe, Farrell and Leuschke",
...omitted all other fields
"user": {
"id": 5,
"name": "Tierra Osinski",
"email": "4@cirqll.nl",
...omitted all other fields
},
"contacts": {
"data": [
{
"id": 302,
"user_id": 2,
"customer_id": 93,
"first_name": "bean",
"last_name": "burh",
...omitted all other fields
"user": {
"id": 2,
"name": "Matteo Kertzmann",
"email": "1@cirqll.nl",
...omitted all other fields
}
},
{
...omitted all fields
}
],
"limit": 50,
"total": 2,
"offset": 0
}
},
{
...omitted all fields
}
],
"limit": 100,
"total": 2,
"offset": 0
}
/api/customer
):with | allowed | reason |
---|---|---|
user | ✅ | one-to-one relationship |
user.company | ✅ | one-to-one-to-one relationship |
user.company.address | ✅ | one-to-one-to-one-to-one relationship |
user.company.address.company | ✅ | one-to-one-to-one-to-one relationship |
user.customers | ❌ | onte-to-one-to-many relationship |
contacts | ✅ | many-to-many relationship |
contacts.user | ✅ | many-to-many-to-one relationship |
contacts.user.company | ✅ | many-to-many-to-one relationship |
contacts.notes | ❌ | many-to-many-to-many relationship |
depth * points
. You have a maximum threshold of 16 (this number might change in the future). The "X-Eager-Loading-Weight" header will appear in the response with your calculated weight.field_values(1),contracts.field_values(3+2),chances.field_values(3+2),tasks.field_values(3+2)
field_values(1),appointments(3),assignments(3),chances(3),contracts(3),tasks(3)
permissions
in roles
field_values
customers
, contacts
, appointments
, tasks
, chances
, assignments
and contracts
options
in fields
user_id
it means you can eager load the user.