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: updated post char limit to 10,000 #2374

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/common/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export interface CreatePostArgs
}

const MAX_TITLE_LENGTH = 250;
const MAX_CONTENT_LENGTH = 4000;
const MAX_CONTENT_LENGTH = 10_000;

type ValidatePostArgs = Pick<EditPostArgs, 'title' | 'content'>;

Expand All @@ -249,7 +249,7 @@ export const validatePost = (

if (content.length > MAX_CONTENT_LENGTH) {
throw new ValidationError(
'Content has a maximum length of 4000 characters',
'Content has a maximum length of 10000 characters',
capJavert marked this conversation as resolved.
Show resolved Hide resolved
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/schema/posts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ export const typeDefs = /* GraphQL */ `
title: String!

"""
Content of the post (max 4000 chars)
Content of the post (max 10000 chars)
capJavert marked this conversation as resolved.
Show resolved Hide resolved
"""
content: String
): Post!
Expand All @@ -822,7 +822,7 @@ export const typeDefs = /* GraphQL */ `
"""
title: String
"""
Content of the post (max 4000 chars)
Content of the post (max 10000 chars)
capJavert marked this conversation as resolved.
Show resolved Hide resolved
"""
content: String
): Post! @auth
Expand Down
Loading