Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(apps/gql): add post upvote mutations #605

Merged
merged 2 commits into from
Aug 7, 2023
Merged

Conversation

rasitds
Copy link
Member

@rasitds rasitds commented Aug 7, 2023

Description

Created create and remove mutations for post upvotes.
Also ensured that postID and userID are unique with one block attribute (@@unique) in the psima schema.

Closes #554
Closes #556

@rasitds rasitds added the apps/gql issues related to our gql service label Aug 7, 2023
@rasitds rasitds requested a review from a team as a code owner August 7, 2023 17:19
@rasitds rasitds requested review from ayhansipahi and tw4 August 7, 2023 17:19
@vercel
Copy link

vercel bot commented Aug 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kampus-gql ❌ Failed (Inspect) Aug 7, 2023 9:04pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
kampus-next ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2023 9:04pm
kampus-pasaport ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2023 9:04pm
kampus-ui ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2023 9:04pm

@rasitds rasitds requested review from usirin and FurkanGM August 7, 2023 17:20
Copy link
Member

@FurkanGM FurkanGM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

Comment on lines 359 to 361
if (!input.postID) {
return InvalidInput("post is required");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be already required on graphql ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, this is defined as required in the schema, so we can remove this.

Comment on lines 375 to 377
if (!input.postID) {
return InvalidInput("post is required");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same required like above

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, let's delete this.

Copy link
Member

@usirin usirin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 <3

@rasitds rasitds merged commit 588d5b3 into dev Aug 7, 2023
1 of 2 checks passed
@rasitds rasitds deleted the post-upvote-mutation branch August 7, 2023 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apps/gql issues related to our gql service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(gql): Create removePostUpvote mutation feat(gql): Create createPostUpvote mutation
4 participants