strawberry-graphql / strawberry.rocks

Website for Strawberry GraphQL

Home Page:https://strawberry.rocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Strawberry GraphQL website

This is the repo for Strawberry GraphQL. If you want to edit the documentation head to the main repository.

This repo only contains the template and design of the website.

Docs

This shows the latest released version and not the master branch docs.

https://strawberry.rocks/docs

Shows the latest release from Strawberry Graphql Repo. These pages are rendered at build time and revalidated after 60 seconds. When a new release of Strawberry Graphql is done then the site should update Strawberry GraphQL site by itself. Not requiring a re-deployment.

Pull Requests

https://strawberry.rocks/docs/pr/:pull-request-number

Pull requests on Strawberry Graphql Repo with a label of ok-to-preview can be viewed. Theses are rendered on-demand and cached. They will be revalidated after 60 seconds.

Version Releases

https://strawberry.rocks/docs/tag/:release-tag

Releases of Strawberry Graphql can be viewed. Theses are rendered on-demand and cached. But are not revalidated on the server unless a new deployment is done.

How to setup the project

Make sure to have nodejs 14.16.0 (exact version shouldn't matter too much, you can use asdf to install it, in case).

You also need a GitHub token, this is used to fetch the list of contributors for the repo, you can create one with the following scopes public_repo, read:packages, read:user, repo:status, following this guide or by clicking this link directly (notice it will ask you for a password).

The token needs to be stored in a .env file, like this:

GITHUB_TOKEN=123123123

Installing the dependencies

We are using npm to manage dependencies, so can install the dependencies by running

pnpm install

Running the website

To run the website, you can use npm:

pnpm run dev

This should start the server on http://localhost:3000

GraphQL TypeScript Typings

We generate the TypeScript typings for any GraphQL queries using.

Outputted to ./types/graphql.d.ts

To update them run.

pnpm run codegen

Any new GraphQL query will need a comment before it to generate theses typings.

/* GraphQL */ `query GoesHere {}`;

Debugging

To run the website in debug mode:

pnpm run dev:inspect

See next.js docs on the different ways to connect to the debugger.


About

Website for Strawberry GraphQL

https://strawberry.rocks

License:MIT License


Languages

Language:TypeScript 66.0%Language:Astro 23.1%Language:CSS 7.4%Language:JavaScript 2.9%Language:HTML 0.3%Language:Python 0.2%Language:MDX 0.2%