Skip to content

ajcwebdev/redwood-kitql

Repository files navigation

RedwoodJS and KitQL

Redwood API

Install dependencies and run only the Redwood api side on localhost:8911:

yarn
yarn rw dev api

Test the endpoint on localhost:8911/graphql or run the following curl command:

curl 'http://localhost:8911/graphql' \
  -H 'content-type: application/json' \
  -d '{"query":"{ redwood { version currentUser prismaVersion } }"}'

Copy the contents of .env.example and create a new .env file.

cp .env.example .env

The Redwood API endpoint (http://localhost:8911/graphql) is set to an environment variable (VITE_REDWOOD_API_ENDPOINT).

Start KitQL

Keep your first terminal running, open another and navigate into the svelte directory. Install dependencies and run the development server on localhost:3000.

cd svelte
yarn
yarn start

Open localhost:3000 to see the frontend querying the Redwood version from the API.

Redwood Version 1 KitQL Query