{"id":13761762,"url":"https://github.com/basementstudio/next-contentful-graphql","last_synced_at":"2025-04-08T04:34:15.992Z","repository":{"id":42698779,"uuid":"304886301","full_name":"basementstudio/next-contentful-graphql","owner":"basementstudio","description":"Setup for using next with Contentful's Graphql API and have code generation for the schema and the queries and stuff... with great typescript support.","archived":false,"fork":false,"pushed_at":"2023-01-06T15:24:57.000Z","size":4907,"stargazers_count":8,"open_issues_count":24,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-04T11:52:16.702Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basementstudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-17T13:40:32.000Z","updated_at":"2023-07-14T15:43:21.000Z","dependencies_parsed_at":"2023-02-06T05:45:30.921Z","dependency_job_id":null,"html_url":"https://github.com/basementstudio/next-contentful-graphql","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":"basementstudio/next-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basementstudio%2Fnext-contentful-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basementstudio%2Fnext-contentful-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basementstudio%2Fnext-contentful-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basementstudio%2Fnext-contentful-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basementstudio","download_url":"https://codeload.github.com/basementstudio/next-contentful-graphql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247779796,"owners_count":20994569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T14:00:27.670Z","updated_at":"2025-04-08T04:34:13.560Z","avatar_url":"https://github.com/basementstudio.png","language":"CSS","funding_links":[],"categories":["Nextjs Starter"],"sub_categories":[],"readme":"# next-contentful-graphql\n\nSetup for using next with Contentful's Graphql API and have code generation for the schema and the queries and stuff... with great typescript support.\n\n## Before deploying\n\n- Create a contentful space\n- To fill up the env vars, you'll need\n  - Access tokens: `https://app.contentful.com/{YOUR_SPACE}/84rr8cohdvyr/api/keys`\n  - GraphQL endpoint: `https://graphql.contentful.com/content/v1/spaces/{YOUR_SPACE}/environments/master`\n- That's it, click the button below and get started\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fbasementstudio%2Fnext-contentful-graphql\u0026env=CMS_GRAPHQL_ENDPOINT,CMS_ACCESS_TOKEN,CMS_PREVIEW_ACCESS_TOKEN,CMS_PREVIEW_SECRET)\n\n## Usage with other CMSs\n\nFor DatoCMS, look at [next-dato-graphql](https://github.com/basementstudio/next-dato-graphql).\n\nThis setup was tested with Contentful, so, with other CMS services it might not work. In Prismic, for example, due to their GraphQL API not supporting POST requests (super non-standard), this setup doesn't work.\n\nBut, GraphQL API implementations tend to be very similar, so maybe, if not using Contentful, it's also a good idea to start with this, and adapt it to your specific CMS API.\n\n## Featured aspects of the stack\n\n- Typescript\n- NextJS\n- graphql-request\n- graphql-codegen\n\n## To get started\n\n- `yarn`\n- Copy the contents of .env.example into `.env` (not `.env.local`, cause dotenv, which graphql-codegen needs, works with `.env` and I didn't kmow how to configure for `.env.local`)\n- Run `yarn gql-codegen` to generate the schema\n- Every time you change the schema of the cms, you should run the code-gen.\n\n## Things to note\n\n- It comes with Inter (it's better to host fonts here rather than getting them from google fonts). Remove it if you are not going to use it.\n- Pages, components, etc... are located under `/src`. If you are changing this, be sure to also update `tsconfig.json`'s `baseUrl`.\n\n---\n\nIf you find you need to make extra config to make this work better (such as some eslint rule, or some prettier change), feel free to submit a pr suggesting your changes. Our focus is for you to get up and running with the least steps and burden as possible.\n\n---\n\nLet's go 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasementstudio%2Fnext-contentful-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasementstudio%2Fnext-contentful-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasementstudio%2Fnext-contentful-graphql/lists"}