BoscaDeveloper Documentation

Profiles

Keep account identity separate from social data, typed attributes, visibility, and relationships.

What a profile represents

A profile holds a name, typed attributes, and social information such as relationships, bookmarks, marks, ratings, and guide progress. It can be linked to a Principal or exist independently. Profiles and principals use separate IDs.

Profile.principal is the optional owning principal ID in Kotlin; GraphQL resolves it to a principal object. Principal.primaryProfileId identifies the selected default profile and can be unset.

Profile types

  • GENERIC: an individual or standalone profile.
  • ORGANIZATION: the profile associated with an organization.
  • CHILD: a managed child profile.

Read your profiles

graphql

profiles.current returns a list of profiles associated with the current principal. Use isPrimary to identify its default. Unauthenticated callers receive an Anonymous placeholder profile with a nil UUID.

Edit a profile

graphql

Replace the example ID with a profile you manage. ProfileInput requires name, attributes, and visibility. Omitting searchable while editing preserves its current value.

Variables

Editing submits the provided attribute inputs; it does not replace the entire attribute list. For a targeted attribute addition, use addAttributes instead.

Typed attributes

Attributes reference an entry in the attribute-type registry by typeId. Their JSON values can carry contact data, preferences, or other structured information. Each record also has visibility, confidence, priority, source, and an optional expiration. Discover the installed types rather than assuming a fixed list:

graphql
graphql

ProfileAttributeInput requires typeId, confidence, priority, source, and visibility. The JSON attributes value itself is optional. Use expiration in input; the result field is named expires. Protected attribute types require administrator authority to write.

Visibility and search

Profiles and attributes each carry a ProfileVisibility: USER, FRIENDS, FRIENDS_OF_FRIENDS, PUBLIC, or SYSTEM. Read access also goes through permission evaluation. A PUBLIC profile permits public record reads; it does not make every attribute public.

searchable controls profile search eligibility. Setting it does not override visibility or access rules. Soft-deleted profiles are excluded from search.

Relationships and account administration

Applications can request relationships through profiles.requestRelationship and approve, decline, or cancel pending requests. Direct addRelationship is reserved for administrators and system services.

Administrator operations can link or clear a principal, mark a profile deleted, restore it, and permanently delete it. Permanent deletion requires the profile to have been marked deleted first.

Where to look in the workspace

The base model lives in bosca-core/core/src/main/kotlin/bosca/profile/model/Profile.kt. Profile services, controllers, attribute handling, and the profiles.graphqls schema belong to the social component.