miguelcarrascoq / graphql-server-client-nextjs

Repository from Github https://github.commiguelcarrascoq/graphql-server-client-nextjsRepository from Github https://github.commiguelcarrascoq/graphql-server-client-nextjs

NextJS 14 - GraphQL Server & Client

GraphQL Server & Client with Next.js, and deploy to Netlify.

Install and run locally

npm install
npm run dev

Operation Example

query ExampleQuery {
  hello
}

CURL version

curl --request POST \
  --header 'content-type: application/json' \
  --url 'https://graphql-server-client-nextjs.netlify.app/api/graphql' \
  --data '{"query":"query ExampleQuery { hello }"}'

set .env file

NEXT_PUBLIC_URL_SERVER_GRAPHQL=http://localhost:3000/api/graphql

deploy to netlify

Working project in: https://graphql-server-client-nextjs.netlify.app

About


Languages

Language:TypeScript 80.4%Language:JavaScript 19.6%