오늘은 리스트를 받아오고 스크롤을 내릴때 로딩 스크롤이 나올수 있는 기능을 넣어보았다. 가장먼저 생각 한것, 쿼리문을 어떻게 수정해야할까. 최소한으로 필요한 사항은 한번에 몇개의 데이터를 가져올것인지. 그리고 게시판으로 생각하면 내가 어떤 페이지의 정보를 가져왔는지 이다. 구글링을 해 보았을때, 기본적 REST API 서버에서 가져올때 https://r...
로그인시 localstorage에 token을 저장 하고, 서버로 요청을 보낼 때 헤더에 토큰을 보내도록 설정 해 놓았다. 하지만 위에처럼 했을 경우 , 로그인시 토큰이 저장되는것 까지는 문제없이 되는데 서버에서 계속 인증이 되지 않는 현상이 생겼다. 그래서 이런식으로 async/await 를 활용하여 비동기 처리를 하니 이전 문제가 없어졌다.
참고:https://stackoverflow.com/questions/59359280/react-app-error-failed-to-construct-websocket-an-insecure-websocket-connecti https://www.apollographql.com/docs/tutorial/local-state/ https://blog.has...
https://www.apollographql.com/docs/react/data/subscriptions/#gatsby-focus-wrapper https://www.prisma.io/docs/1.13/tutorials/build-graphql-servers/development/build-a-realtime-graphql-server-with-subs...