Infinite loop when queryKey property changes #4079
Unanswered
njvoulelis
asked this question in
General
Replies: 1 comment
-
please show a codesandbox reproduction. Is that uuid part of the query key? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am sending a reactQuery request that has a request body object. One property of the object is a unique Guid generated at the time the request is created. This is causing an infinite loop because the queryKey technically changes. What is the best way to work around/resolve this? Sample Request:
const request = {
user: {
sessionId: uuid.v4(), (this is the problem)
groupRoleId: 0,
roleId: -1,
loginId:
${userContext.companyId}|${userContext.employeeId}
,firstName: userContext.firstName,
lastName: userContext.lastName,
preferredName: '',
email: 'N/A',
}
Beta Was this translation helpful? Give feedback.
All reactions