Updated Developers Guide (markdown)
parent
9c1e359af9
commit
1b54ce82a7
@ -2,6 +2,10 @@
|
||||
|
||||
### Frontend
|
||||
|
||||
#### Tools used
|
||||
|
||||
- [graphql-codegen](https://github.com/dotansimha/graphql-code-generator) for generating typescript types from graphql queries
|
||||
|
||||
|
||||
#### Directory structure
|
||||
|
||||
@ -30,6 +34,11 @@ src/
|
||||
|
||||
### Backend
|
||||
|
||||
#### Tools used
|
||||
|
||||
- [sqlc](https://github.com/kyleconroy/sqlc) for converting SQL query files into Golang code
|
||||
- [gqlgen](https://github.com/99designs/gqlgen) for converting graphql schema files into Golang code
|
||||
|
||||
#### Architecture
|
||||
|
||||
```
|
||||
@ -57,4 +66,17 @@ internal/ # all business logic lives here
|
||||
route.go # builds all of the routes
|
||||
migrations/ # a directory of database schema migrations
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
#### GraphQL schemas
|
||||
|
||||
The schema for the API lives as multiple files in the `internal/graph/schema/` folder.
|
||||
|
||||
The are converted into a single file (because gqlgen wants that) by a mage target `backend:genSchema`
|
||||
|
||||
All primary models live in `_models.gql`
|
||||
|
||||
The root Query and Mutation objects live in `_root.gql`
|
||||
|
||||
The rest of the files contain domain specific declarations. For instance the Mutations
|
||||
for interacting with tasks is in the `task.gql` file.
|
Loading…
Reference in New Issue
Block a user