Skip to content

Commit

Permalink
feat: labels on proposal and proposals queries (#938)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR authored Oct 7, 2024
1 parent 9be174b commit 3767e8f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/graphql/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ export function formatUser(user) {

export function formatProposal(proposal) {
proposal.choices = jsonParse(proposal.choices, []);
proposal.labels = jsonParse(proposal.labels, []) || [];
proposal.strategies = jsonParse(proposal.strategies, []);
proposal.validation = jsonParse(proposal.validation, {
name: 'any',
Expand Down
1 change: 1 addition & 0 deletions src/graphql/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ type Proposal {
body: String
discussion: String!
choices: [String]!
labels: [String]!
start: Int!
end: Int!
quorum: Float!
Expand Down
1 change: 1 addition & 0 deletions src/helpers/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ CREATE TABLE proposals (
body MEDIUMTEXT NOT NULL,
discussion TEXT NOT NULL,
choices JSON NOT NULL,
labels JSON DEFAULT NULL,
start INT(11) NOT NULL,
end INT(11) NOT NULL,
quorum DECIMAL(64,30) NOT NULL,
Expand Down

0 comments on commit 3767e8f

Please sign in to comment.