-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f622395
commit f7789b3
Showing
1 changed file
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,37 @@ | ||
# Purreads π πββ¬ | ||
# Purreads πββ¬ | ||
|
||
Goodreads clone for cats. | ||
## What is it? | ||
|
||
Purreads is a simple Goodreads clone with a very limited functionality. I initiated it to try out GraphQL with Go. | ||
|
||
With Purreads you can create a new ~~user~~ cat, create a new book or add a book to a cats' library as an "in progress" or a "read" book. | ||
|
||
Main packages: | ||
|
||
- [GORM](https://gorm.io/gorm) for the ORM | ||
- [PostgreSQL](https://gorm.io/docs/connecting_to_the_database.html#PostgreSQL) as the database | ||
- [gqlgen](https://github.com/99designs/gqlgen) for the GraphQL server | ||
|
||
## Schema | ||
|
||
GraphQL schema can be found in [graph/schema.graphqls](graph/schema.graphqls) and resolvers are in [graph/schema.resolvers.go](graph/schema.resolvers.go). | ||
|
||
## Usage | ||
|
||
Start server by running: | ||
|
||
```sh | ||
$ go run server.go | ||
``` | ||
|
||
GraphQL playground will be available at port 8080. | ||
|
||
### Updating schema | ||
|
||
After updating the GraphQL schema or operations, don't forget to run generate command: | ||
|
||
```sh | ||
$ go generate ./... | ||
``` | ||
|
||
This command will update [generated code](graph/generated.go) according to your schema if necessary. |