๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • What would life be If we had no courage to attemp anything?

Development/API2

[API] graphql-request | GraphQLClient, request graphql-request GraphQL์„ ์‚ฌ์šฉํ•˜์—ฌ ์„œ๋ฒ„์™€ ํ†ต์‹ ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋˜๋Š” ๊ฐ„๋‹จํ•œ JavaScript ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ GraphQL API๋ฅผ ํ˜ธ์ถœํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ โœ… ํ•„์š”ํ•œ ๊ฒƒ headers - token, Content-Type query variables endpoint ⇒API URI GraphQLClient GraphQL ์„œ๋ฒ„์— HTTP ์š”์ฒญ์„ ๋ณด๋‚ด๊ณ  ์‘๋‹ต์„ ๋ฐ›๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ . GraphQLClient๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ GraphQL API ์—”๋“œํฌ์ธํŠธ์— HTTP ์š”์ฒญ์„ ๋ณด๋‚ผ์ˆ˜ ์žˆ์Œ ์ด ํด๋ž˜์Šค๋Š” ์—ฌ๋Ÿฌ ๊ฐ€์ง€ ๋ฉ”์„œ๋“œ๋ฅผ ์ œ๊ณต. ๊ฐ€์žฅ ์ผ๋ฐ˜์ ์ธ ๋ฉ”์„œ๋“œ๋Š” request๋ฉ”์„œ๋“œ request request๋ฉ”์„œ๋“œ๋Š” GraphQL ์ฟผ๋ฆฌ๋ฅผ ์‹คํ–‰ํ•˜๊ณ , ์„œ๋ฒ„๋กœ๋ถ€ํ„ฐ ๊ฒฐ๊ณผ๋ฅผ ๋ฐ›๋Š” ๋ฐ ์‚ฌ์šฉ GraphQL API ์—”๋“œํฌ์ธํŠธ URL๊ณผ G.. 2023. 6. 29.
[API] GraphQL ๊ด€๋ จ dependency | Apollo Client, graphql-request graphQL ๊ด€๋ จ ์˜์กด์„ฑ ์ถ”๊ฐ€ 1. Apollo Client Introduction to Apollo Client Apollo Client is a comprehensive state management library for JavaScript that enables you to manage both local and remote data with GraphQL. Use it to fetch, cache, and modify application data, all while automatically updating your UI. Apollo Client helps www.apollographql.com Hooks ์—†์ด Apollo Client ์‚ฌ์šฉํ•˜๊ธฐ yarn: yarn add apollo-boost.. 2023. 6. 15.