https://facebook.com/groups/graphql-kr logo
#클럽-프론트엔드
Title
# 클럽-프론트엔드
u

이찬희

11/23/2021, 3:21 AM
GraphQL과 무관하지만 오픈소스가 처음이라 피드백을 여쭤보려고 여기에 올려봅니다 ㅎ.ㅎ https://github.com/dano-inc/react-query-helper
ohh 6
혹쉬 오픈소스를 관리하는 팁 아니면 노하우,, 아니면 알아둘만한게 있다면 조언 부탁드립니다 🙇
n

Nil

11/23/2021, 7:39 AM
https://news.hada.io/topic?id=5379 최근에 본 글인데 도움이 됐으면 하네요 ㅎㅎ
🙏 1
t

Tony Won

11/25/2021, 7:07 AM
@이찬희 슬쩍 봤는데 넘 좋네요 ㅎㅎ 굳이굳이 피드백 드리자면
Copy code
import { QueryClient } from 'react-query';
import { QueryHelper } from 'react-query-helper';

const queryClient = new QueryClient();
QueryHelper.setQueryClient(queryClient);

new QueryHelper(
  ['user'],
  (context) => ...
)
이런 API 보다는
Copy code
import { QueryClient } from 'react-query';
import { QueryHelper } from 'react-query-helper';

const queryClient = new QueryClient();

new QueryHelper(
  queryClient,
  ['user'],
  (context) => ...
)
이게 더 낫지 않을까요? ㅎㅎ + 저라면,
Copy code
import { QueryClient } from 'react-query';
import { makeQueryHelper } from 'react-query-helper';

const queryClient = new QueryClient();

makeQueryHelper({
  queryClient,
  models: ['user'],
  fetcher: (context) => ...
})
이렇게 했을듯 ㅎㅎ
+ DataLoader를 활용한 Batch Helper도 있으면 좋겠다는 생각을 했어요 ㅎㅎ
u

이찬희

11/25/2021, 7:25 AM
오오 피드백 감사합니다 👍
3 Views