Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pekkah/tanka-graphql-samples
Example of using tanka-graphql with Urql and Preact
https://github.com/pekkah/tanka-graphql-samples
apollo-link dotnet graphql sample tanka
Last synced: 7 days ago
JSON representation
Example of using tanka-graphql with Urql and Preact
- Host: GitHub
- URL: https://github.com/pekkah/tanka-graphql-samples
- Owner: pekkah
- License: mit
- Created: 2018-11-11T08:04:35.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-08-21T06:55:19.000Z (3 months ago)
- Last Synced: 2024-08-21T08:10:29.312Z (3 months ago)
- Topics: apollo-link, dotnet, graphql, sample, tanka
- Language: TypeScript
- Homepage:
- Size: 2.08 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tanka Chat App built with Tanka GraphQL library
Simple chat application with channels and messages.
Use
s queries, mutations and subscriptions. Subscriptions use `graphql-ws` -protocol.## Running the app
App is built with Asp.NET Core backend and Preact frontend. Backend acts as both API and host
for the frontend.### Prerequisites
- Application uses GitHub authentication and you must provide your own ClientId and ClientSecret
in the `appsettings.Local.json` -configuration file.
- Application uses Node.js and npm to build the frontend. You must have Node.js installed on your machine.### Running the app
```pwsh
dotnet build -c Release
dotnet run -c Release --launch-profile ChatProduction --project .\src\Chat.Api\
```This will build the backend and frontend and run the app in "Production" -environment.
## Development
- Same as running the app
- Install frontend dependencies `npm install` in the `src\Chat.Api\UI2` -folder### Editor
You can develop the app in two ways:
- Run Vite manually from command prompt: set the Vite:AutoRun false in your configuration and launch Vite manually
`npm run dev` in the `src\Chat.Api\UI2` -folder.
- Let Visual Studoo start Vite automatically: set the Vite:AutoRun true in your configuration.Running Vite manually is faster, but you need to remember to start it before running the app.
Letting Visual Studio start Vite automatically is slower as Vite is started and stopped when you launch the app.