Proposal

The proposal type is a widely used type in Firstroot GraphQL implementation and it is included in several queries and mutations.

Access level: public.

Note: anonymous access to some fields is restricted.

type Proposal {
alreadyReacted: Boolean
category: Category
categoryId: ID
comments(
after: String
before: String
first: Int = 0
last: Int = 0
filters: ProposalCommentFiltersInput
): CommentConnection!
commentsCount: Int!
cost: Decimal
costAsMoney: Money
createdAt: ISO8601DateTime!
description: String
id: ID!
isOwner: Boolean
name: String
owner: Party
pbCycle: PBCycle
reactions: Reactions
registeredReactions: [String!]!
thumbnail: String
totalReactions: Int!
updatedAt: ISO8601DateTime!
user: User
userId: String
videoUrl: VideoUrl
}

Fields#

alreadyReacted (Boolean)#

Indicates the current user has reacted to the proposal, does not matter the type of reaction. Access to this field requires a logged in user, anonymous requests will always return null.

Access level: participant, PB admin.
Returns: Int | null

category (Category)#

Category object which this item belongs to.

Through this type client can access al fields available in a Category including name, icon and others.

Access level: public.

categoryId (ID)#

The category UUID which the proposal belongs to.

Access level: public.

comments (CommentConnection!)#

The comments of the proposal.

Returns the elements in the list that come after the specified cursor.

Returns the elements in the list that come before the specified cursor.

Returns the first n elements from the list.

Returns the last n elements from the list.

Filter proposal comments by different arguments.

commentsCount (Int!)#

Number of comments in the proposal.

cost (Decimal)#

DEPRECATED Deprecated in favor of `costMoney`.

The estimated cost for the proposal implementation.

Access level: public.
Returns: Decimal | null

costAsMoney (Money)#

The estimated cost for the proposal implementation.

Access level: public.
Returns: Decimal | null

createdAt (ISO8601DateTime!)#

description (String)#

A description of the proposal generated and refined by the PB Cycle participants.

Access level: public.

id (ID!)#

The proposal UUID identifier in the system.

Access level: public.

isOwner (Boolean)#

Indicates if current user is the proposal's creator. Access to this field requires a logged in user, anonymous requests will always return false.

Access level: public, PB admin.

name (String)#

The proposal name provided by participant.

Access level: public.

owner (Party)#

Party object who created this proposal. This field provide access to all Party type available.

This field is available only for participants or admin in the PB Cycle, for anonymous requests the field will be always null.

Access level: CYCLE_PARTICIPANT, CYCLE_ADMIN.
Returns: PartyType | null

pbCycle (PBCycle)#

PB Cycle object which this proposal belongs to. Every single proposal must belong yo a PB Cycle, this field provides access to those PBCycle type fields.

Access level: public

Note: some fields may not be available for anonymous users.

reactions (Reactions)#

The totals per reaction type received by proposal.

Access level: participant, PB admin.

registeredReactions ([String!]!)#

Return the list of reactions this proposal received. Reactions are returned as an array in which every index correspond to a type of reaction the proposal has received.

Access level: public.
Returns: [String] | null


Examples:

ReturnedExplanation
['LIKE', 'NEUTRAL']Proposal has only received reactions of type LIKE and NEUTRAL, but no reactions of type DISLIKE.
[]Proposal has not received any reaction yet.

thumbnail (String)#

The image assigned to proposal. All images are moderated using Amazon Rekognition before to accept then and before to be publicly available. The content of this field depends on the approval of provided image.

This value will be null if the client did not upload and image for proposal or if the uploaded image is under approval process. Once the image is approved or rejected by system this value will be automatically fulfilled with the URL of uploaded image if it was approved, or with this URL if image was rejected.

Rejection of an image depends on its content. Rekognition search for inappropriate content like nudity, gambling, violence and other not allowed content in the image.

Returns: null | URL

totalReactions (Int!)#

The SUM of all reactions this proposal has received. This value includes all types of reactions.

Access level: public.

updatedAt (ISO8601DateTime!)#

user (User)#

DEPRECATED Deprecated due to the removal of `user` relationship with this model. Use `owner` instead.

User object who created this proposal. This field provide access to all User type available fields.

This field is available only for participants or admin in the PB Cycle, for anonymous requests the field will be always null.

Access level: participant, PB admin.
Returns: UserType | null Deprecated: This field is deprecated and will return null every time

userId (String)#

DEPRECATED Deprecated due to the removal of `user` relationship with this model. Use `owner` instead.

The user UUID, creator of the proposal. This fields is available only for logged in users, other case will always return null

Access level: participant, PB admin.
Returns: UUID | null Deprecated: This field is deprecated and will return null every time.

videoUrl (VideoUrl)#

The video URL if it was provided by participant. This URL will point to a YouTube video URL.