Next.js 13 and headless WordPress with WPGraphQL

Поделиться
HTML-код
  • Опубликовано: 3 дек 2024

Комментарии • 15

  • @SerRGilk
    @SerRGilk 11 месяцев назад +6

    Hey, I rarely leave a comment on videos, but this one definitely deserves one.
    I have searched for ages now for a normal, simple, easy-to-follow and understand, simple clear explanation of how the f*** set up a headless project with WP backend and graphql, and everyone is starting to explain the fundamentals of next, and using outdated folders structure, and trying to overcomplicate the process.
    And I finally found your video.
    Your video is amazing, simple, on point, no fluff, thank you for that.

    • @WPEngineBuilders
      @WPEngineBuilders  9 месяцев назад

      Anytime!!! Are you in our Discord channel?

  • @ashleypfeil267
    @ashleypfeil267 7 месяцев назад +1

    This was a godsend. Thank you very much.

  • @chip_a
    @chip_a 6 месяцев назад +1

    thanks I will try

  • @shayanfaghihi
    @shayanfaghihi 10 месяцев назад +1

    Thanks for the explanation. However, I think there were parts in this video that meant to be edited but you have uploaded the raw version :D

  • @AlistairMcClymont
    @AlistairMcClymont 11 месяцев назад

    Great tutorial thank you. Is there a reason why you used GET for the home page and POST for the posts?

    • @lindsayaiello501
      @lindsayaiello501 8 месяцев назад

      My guess is because you have to pass a body with the query AND variables.. ? Notice in the GET the query is passed as a query param.

  • @madanmalhotra
    @madanmalhotra 5 месяцев назад

    i thought graphql only work in pages router. but you are using App router. hows it?

  • @tedspens
    @tedspens Год назад +1

    I'm running into an error: SyntaxError: Unexpected end of JSON input
    at JSON.parse ()
    at async getPosts (./app/page.jsx:33:22)
    at async PostList (./app/page.jsx:37:19)
    I'm running Node 20.10.0 but also tried on Node 8.(lts version) and made sure my .env is correct. Stopped and restarted the server didn't fix it. Any suggestions on what might be the issue? I'd love to get this up and running. Thanks

    • @hicee
      @hicee 10 месяцев назад

      i get same issue

    • @yuryarakelove5322
      @yuryarakelove5322 8 месяцев назад

      I solved this problem. We get this error in case if our wordpress site was not uploaded. Check if you uploaded your WP. If u see console.log(data) u gonna receive undefined

  • @Steve-nd2wj
    @Steve-nd2wj 7 месяцев назад

    Anyone else having issues with the fetch? It is telling me the fetch failed.
    I tried testing other things out, and if you make the server component into a client one, and then use `useEffect`, it is able to then finally fetch the data.

  • @acidfather
    @acidfather 7 месяцев назад

    I'm getting this error when I try to install
    PS C:\xampp\htdocs
    extjs14-headlesswp-example> npm run install
    node:internal/modules/cjs/loader:1205
    throw err;
    ^
    Error: Cannot find module 'C:\Users
    ame\AppData\Roaming
    pm
    ode_modules
    pm\bin
    pm-cli.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1202:15)
    at Module._load (node:internal/modules/cjs/loader:1027:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:187:14)
    at node:internal/main/run_main_module:28:49 {
    code: 'MODULE_NOT_FOUND',
    requireStack: []
    }

    • @WPEngineBuilders
      @WPEngineBuilders  7 месяцев назад

      Hi there! Please join our Discord community so we can support you with this error.
      discord.gg/headless-wordpress-836253505944813629
      Thank you!
      -- Sam 🌟 Community Manager