What would be the correct way to type queryKey if input is a skipToken?
If
queryFn is a skipToken would it ignore the queryKey? If it does would an empty array suffice?1 Reply
mute-gold•11mo ago
Have
variables be optional, and do a variables != null ternary
Type of query key in this case would be ["projects", GetProjectRequest | undefined]
Only introduce skipToken in ther queryFn ternary
You can add as const to the return of useGetProjectQueryKey