Create project favorite

createProjectFavorite(projectReference: ID!): ProjectFavorite!

Requires project.read.

Arguments

ArgumentTypeRequiredDescription
projectReferenceID!YesProject UUID, slug or domain. A repeat call returns the existing favorite record.

Response

Returns ProjectFavorite!. Open the type for its fields and nested types.

FieldTypeDescription
idID!Identifier of the favorite association, not the project.
userIdID!User who owns this favorite association.
projectIdID!Identifier of the favorited project; favorites do not grant project access.
createdAtDateTime!Timestamp when this favorite association was created.
projectProjectFull project when project.read is allowed; null if access is denied or the project was deleted.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation CreateProjectFavorite($projectReference: ID!) {
  createProjectFavorite(projectReference: $projectReference) {
    id
    projectId
    createdAt
    userId
  }
}
json
{
  "projectReference": "00000000-0000-4000-8000-000000000001"
}