imranhsayed / nextjs-headless-wordpress

🔥 Nextjs Headless WordPress
https://codeytek.com/course/next-js-headless-wordpress-course/
GNU General Public License v3.0
640 stars 161 forks source link

GraphQLError: Syntax Error: Unexpected Name "headerMenus". #73

Open paulonova opened 1 year ago

paulonova commented 1 year ago

I am facing this problem, when i run the same query on the qraphiql, it works, but it gives out the GraphQLError: Syntax Error: Unexpected Name "headerMenus". error when I run it from the NextJS. graph Skärmavbild 2022-11-29 kl  18 55 27

paulonova commented 1 year ago

Please can someone help me?

kakonbarman commented 1 year ago

I fetch the same problem.

kakonbarman commented 1 year ago

I have solved this issue. wrap the entire query with query{ ...code here }

jigneshdpanchal commented 1 year ago

I fetch the same problem.

@kakon4366 thanks for the solution

I've solved this error and here is my working code sample.

error-solved