MCPcopy Create free account
hub / github.com/dailydotdev/apps / createVoteMutationKey

Function createVoteMutationKey

packages/shared/src/hooks/vote/types.ts:70–80  ·  view source on GitHub ↗
({
  entity,
  variables,
}: {
  entity: UserVoteEntity;
  variables?: unknown;
})

Source from the content-addressed store, hash-verified

68} & Pick<UseVoteProps, 'onMutate'>;
69
70export const createVoteMutationKey = ({
71 entity,
72 variables,
73}: {
74 entity: UserVoteEntity;
75 variables?: unknown;
76}): MutationKey => {
77 const base = [entity, 'mutation', 'vote'];
78
79 return variables ? [...base, variables] : base;
80};
81
82export const voteMutationMatcher: UseMutationMatcher<
83 Partial<UseVoteMutationProps>

Callers 2

useVoteFunction · 0.90
voteMutationMatcherFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected