Skip to main content
The Join field exposes a relationship or upload field in the opposite direction. It is virtual: FrogBot queries the related collection instead of storing a second list of IDs on the current record. Use a Join field to show a product’s orders, a category’s posts, or every record that uses an uploaded file.
Here, relatedPosts finds records whose category field refers to the current category. on also accepts a nested path such as details.category.

Schema design

Store a relationship in one place whenever possible. A post can store its category while the category uses a Join field to retrieve its posts. This avoids synchronizing duplicate relationship arrays and remains practical when one category has many posts. For relationships with their own data, create a junction collection. For example, a category-posts collection can contain category, post, featured, and position fields. Join fields on both related collections can then surface those records. On PostgreSQL and SQLite, polymorphic or many-valued relationships normally use an automatically managed _rels table. A dedicated junction collection gives you direct control over that table’s fields and indexes. It can be hidden from admin navigation while Join fields provide the editing interface on either side.

Config options

Admin options

Join fields support the standard field admin options except disableBulkEdit and readOnly, plus:

Returned data

A populated Join field returns docs, hasNextPage, and, when count: true is requested, totalDocs:
For a polymorphic Join, each item contains relationTo and value.

Query options

find and findByID accept a joins option. Pass false to leave every Join field out of the result, or configure each Join field by name: Set a field to false instead of an object to leave just that field out.

REST API

The REST API accepts the same options through a joins query parameter:
Repeat the nested parameters to configure additional Join fields or filters. To leave a Join field out of the result, set it to false, such as ?joins[relatedPosts]=false. The REST API reads joins one field at a time, so ?joins=false has no effect: list each Join field instead.

GraphQL

Join fields retain GraphQL schema metadata for applications that provide and verify their own GraphQL execution integration. FrogBot does not currently ship or mount a public GraphQL endpoint, so this page does not claim an executable GraphQL query path. Use the Local or REST API examples above in a standard FrogBot application.