Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Avendaosander/Plataforma-social/llms.txt

Use this file to discover all available pages before exploring further.

These are the GraphQL return types defined in the Apollo Server schema at server/src/graphql/typeDefs.ts. Every query and mutation in the Plataforma Social API returns one of these types or a list thereof. Understanding each type’s fields and purpose is essential for building correct client queries and handling API responses.

User

The User type represents a registered account. It is returned by getUsers, getUser, postUser, and putUser.
The password field is included in the schema for use by the internal login flow (password verification). Avoid selecting the password field in client-facing queries — it contains the hashed credential value and should never be exposed to end users.
id
String
The unique identifier of the user. A UUID generated automatically on account creation.
username
String
The user’s unique public-facing handle. Must be unique across all accounts.
email
String
The user’s email address. Must be unique across all accounts and is used as the login identifier.
password
String
The user’s hashed password. Stored as a bcrypt hash — never the plain-text value. For internal login use only; do not request this field in client queries.
description
String
An optional bio or profile description provided by the user. Defaults to an empty string.
avatar
String
A URL pointing to the user’s profile picture. Defaults to an empty string when no avatar has been set.

Setting

The Setting type holds all per-user privacy and notification preferences. It is a one-to-one companion to User, created automatically at registration with the defaults shown below.
idSettings
String
UUID primary key of the settings record.
idUser
String
Foreign key referencing the owner’s User.id. Unique — each user has exactly one settings row.
private
Boolean
Controls account visibility. When true, the user’s profile and posts are hidden from unauthenticated or non-following users. Defaults to false.
n_ratings
Boolean
Enables in-app (desktop) push notifications when a user’s post receives a new rating. Defaults to true.
n_comments
Boolean
Enables in-app (desktop) push notifications when a user’s post receives a new comment. Defaults to true.
n_followers
Boolean
Enables in-app (desktop) push notifications when someone follows the user. Defaults to true.
n_populates
Boolean
Enables in-app (desktop) push notifications for trending or popular content highlights. Defaults to true.
n_email_ratings
Boolean
Enables email notifications when a user’s post receives a new rating. Defaults to true.
n_email_comments
Boolean
Enables email notifications when a user’s post receives a new comment. Defaults to true.
n_email_followers
Boolean
Enables email notifications when someone follows the user. Defaults to true.

UserWithSettings

The UserWithSettings type extends the standard User type with an embedded Setting object. It carries the full user profile together with their notification and privacy preferences in a single response.
This type is only returned by the login query. All other user-returning operations (getUser, getUsers, etc.) return the plain User type without the nested Setting.
id
String
UUID of the authenticated user.
username
String
The user’s unique public handle.
email
String
The user’s email address.
password
String
The user’s hashed password. Present for internal session validation; do not expose to clients.
description
String
The user’s optional profile bio. Defaults to an empty string.
avatar
String
URL for the user’s profile picture. Defaults to an empty string.
Setting
Setting
The user’s full notification and privacy settings record, returned inline at login so the client can initialise UI state without a second round-trip.

ResponseID

The ResponseID type is a minimal confirmation envelope returned by destructive mutations that do not need to return the full updated resource.
This type is currently returned by the deleteUser mutation to confirm which user account was removed.
id
String
The UUID of the affected resource — in the case of deleteUser, this is the User.id that was permanently deleted.

Full GraphQL SDL

The complete type definitions as declared in server/src/graphql/typeDefs.ts:
type User {
  id: String
  username: String
  email: String
  password: String
  description: String
  avatar: String
}

type Setting {
  idSettings: String
  idUser: String
  private: Boolean
  n_ratings: Boolean
  n_comments: Boolean
  n_followers: Boolean
  n_populates: Boolean
  n_email_ratings: Boolean
  n_email_comments: Boolean
  n_email_followers: Boolean
}

type UserWithSettings {
  id: String
  username: String
  email: String
  password: String
  description: String
  avatar: String
  Setting: Setting
}

type ResponseID {
  id: String
}

Build docs developers (and LLMs) love