๐Ÿคฆโ€โ™‚๏ธ ๋งค์ฃผ ์‹คํŒจ(37/2020)

1077 ๋‹จ์–ด gridsomefaillessonslearnedtype
์ง€๋‚œ์ฃผ์—, ๋‚˜๋Š” ๊ฒŒ์ด์ธ ๋น„๋ฃจ๋ฐ ์ž…๋ฌธ ์‚ฌ์ดํŠธ๋ฅผ Gridsome์œผ๋กœ ๋ฐ”๊พธ์—ˆ๋Š”๋ฐ, ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹คError: Cannot get field 'id' from type 'Page'. Field does not exist.์ด ์˜ค๋ฅ˜๋Š” the headless CMS Kentico Kontent์— ํŽ˜์ด์ง€๊ฐ€ ๊ฒŒ์‹œ๋˜๊ณ  GraphQL ๋ชจ๋“œ ์ƒ์„ฑ์—์„œ ๋ฐœ์ƒํ•˜๋Š” ๊ฒฝ์šฐ์—๋งŒ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.๊ทธ๋ž˜์„œ ๋””๋ฒ„๊น…ํ•˜๊ธฐ๊ฐ€ ์ƒ๋‹นํžˆ ์–ด๋ ต๋‹ค.
try/fail ๋””๋ฒ„๊น… ๋ฐฉ๋ฒ•์„ ์‹œ๋„ํ–ˆ๋Š”๋ฐ ๋…ธ๋“œ์˜ ์œ ํ˜• ์ด๋ฆ„์œผ๋กœ "Page"๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.๋‚˜๋Š” ์›์ธ์ด ๋ฌด์—‡์ธ์ง€ ํ™•์‹คํ•˜์ง€ ์•Š๋‹ค. ์™œ๋ƒํ•˜๋ฉด ๋ช‡ ์‹œ๊ฐ„ ๋™์•ˆ ๋ชป์„ ๋ฌผ๊ณ  ๋‚œ ํ›„, ๋‚˜๋Š” ๊ณ„์† ํŒŒ๊ณ  ์‹ถ์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.
๊ฒฝํ—˜ ๊ตํ›ˆ: ๋•Œ๋•Œ๋กœ ์šฐ๋ฆฌ๊ฐ€ ์‚ฌ์šฉํ•˜๋Š” ๋„๊ตฌ๋Š” ๋ชจ๋“  ์ •๋ณด๋ฅผ ๊ธฐ๋กํ•˜์ง€ ์•Š๋Š”๋‹ค.์ด๋Ÿฌํ•œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด Gridsome Kontent ํ”Œ๋Ÿฌ๊ทธ์ธ ๊ตฌ์„ฑ์— ์ปจํ…ํŠธ ํ•ญ๋ชฉ ์œ ํ˜•์— ์ ‘๋‘์–ด๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
options: {
  ...
  contentItemConfig: {
    contentItemTypeNamePrefix: '_',
    ...
  }
}

์ข‹์€ ์›นํŽ˜์ด์ง€ ์ฆ๊ฒจ์ฐพ๊ธฐ