Skip to content

Commit

Permalink
Merge pull request #4161 from thematters/fix/writing-cache
Browse files Browse the repository at this point in the history
fix(writing): log writing cache for invalidation
  • Loading branch information
gary02 authored Aug 29, 2024
2 parents 1121ac2 + f515492 commit bea4590
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/common/enums/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export enum NODE_TYPES {
Response = 'Response',
TransactionTarget = 'TransactionTarget',
PinnableWork = 'PinnableWork',
Writing = 'Writing',
}

export const APPRECIATION_TYPES = {
Expand Down
4 changes: 3 additions & 1 deletion src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ import {
const typeResolver = (type: string, result: any) => {
const unionsAndInterfaces = [
NODE_TYPES.Node,
NODE_TYPES.Notice,
NODE_TYPES.Response,
NODE_TYPES.TransactionTarget,
NODE_TYPES.Notice,
NODE_TYPES.PinnableWork,
NODE_TYPES.Writing,
]

if (unionsAndInterfaces.indexOf(type as NODE_TYPES) >= 0 && result?.__type) {
Expand Down
2 changes: 1 addition & 1 deletion src/types/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ export default /* GraphQL */ `
type WritingEdge {
cursor: String!
node: Writing!
node: Writing! @logCache(type: "${NODE_TYPES.Writing}")
}
input RecommendationFollowingInput {
Expand Down

0 comments on commit bea4590

Please sign in to comment.