Skip to content

Commit

Permalink
Fetch post meta attributes with full post (#557)
Browse files Browse the repository at this point in the history
to show the customized post title in meta container
  • Loading branch information
rajeshupwk authored Aug 2, 2022
1 parent 4994c36 commit 6c0ab19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/queries/fragments.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export const fullPost = `
token
createdAt
artistInviteSubmission { ...artistInviteSubmissionDetails }
metaAttributes { title }
summary { ...contentProps }
content { ...contentProps }
repostContent { ...contentProps }
Expand Down
3 changes: 3 additions & 0 deletions src/reducers/v3_reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ function parseUser(state, user) {

const state1 = parseList(state, user.categories, parseCategory)
const state2 = parseList(state1, user.categoryUsers, parseCategoryUser, { userId: user.id })

return smartMergeDeepIn(state2, ['users', user.id], Immutable.fromJS({

// Minumum properties
Expand Down Expand Up @@ -398,6 +399,8 @@ function parsePost(state, post) {
id: post.id,
authorId: deepGet(post, ['author', 'id']), // We don't use links for this

metaAttributes: post.metaAttributes,

// Properties
token: post.token,
createdAt: post.createdAt,
Expand Down

0 comments on commit 6c0ab19

Please sign in to comment.