![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F2qISk%2FbtsMlGz5Gdq%2FYCP5JtHEub2F8Khu5zETM1%2Fimg.png)
[vue-query] query key 관련 공식문서 정리![](https://tistory1.daumcdn.net/tistory_admin/blogs/image/category/new_ico_1.gif)
![](https://tistory1.daumcdn.net/tistory_admin/blogs/image/category/new_ico_1.gif)
·
🤓 기술 학습 & 공부 기록/프론트엔드
📍Query Key의 형태- 직렬화가 가능한 값들의 배열이어야 함- 직렬화가 가능하다 => json.stringify()를 적용할 수 있고, 적용하면 항상 동일한 문자열로 변환된다// 일반적인 배열const userQueryKey = ["user", 1];// JSON.stringify(usersQueryKey) // '["user",1]'// 객체const postQueryKey = ["user", { id: 42 }];// JSON.stringify(postQueryKey) // '["post",{"id":42}]'// An individual todouseQuery({ queryKey: ['todo', 5], ... })// An individual todo in a "preview" format..