Skip to content

Commit

Permalink
Updates #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mshivam2409 committed Feb 10, 2021
1 parent 15c9df9 commit c5e4126
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.keto/roles/admin.json
.keto/roles/user.json
.oathkeeper/jwks.json
./bin/**
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ build:
go build -o bin/main main.go

run:
go run main.go
go run main.go

buildweb:
cd web/
yarn run build
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
## 09/02/2021 `v0.1.0`

- Initial Commit for web app

## 10/02/2021 `v0.1.1`

- GraphQL support added!
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
module anc
module github.com/Mshivam2409/AnC-Courses

go 1.13

require (
github.com/99designs/gqlgen v0.13.0
github.com/andybalholm/brotli v1.0.1 // indirect
github.com/ansrivas/fiberprometheus/v2 v2.1.0
github.com/aws/aws-sdk-go v1.34.28
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-openapi/errors v0.19.8 // indirect
github.com/go-openapi/runtime v0.19.23 // indirect
Expand Down
2 changes: 1 addition & 1 deletion gqlgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ resolver:
# gqlgen will search for any type names in the schema in these go packages
# if they match it will use them, otherwise it will generate them.
autobind:
- "anc/graph/model"
- "github.com/Mshivam2409/AnC-Courses/graph/model"

# This section declares type mapping between the GraphQL and go type systems
#
Expand Down
22 changes: 11 additions & 11 deletions graph/generated/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions graph/schema.resolvers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ package graph
// will be copied through when generating and any unknown code will be moved to the end.

import (
"anc/graph/generated"
"anc/graph/model"
"context"
"fmt"

"github.com/Mshivam2409/AnC-Courses/graph/generated"
"github.com/Mshivam2409/AnC-Courses/graph/model"
)

func (r *mutationResolver) CreateTodo(ctx context.Context, input model.NewTodo) (*model.Todo, error) {
Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"anc/graph/generated"
"net/http"

"github.com/Mshivam2409/AnC-Courses/graph/generated"

"github.com/99designs/gqlgen/graphql/handler"
"github.com/ansrivas/fiberprometheus/v2"
"github.com/gofiber/fiber/v2"
Expand Down
3 changes: 3 additions & 0 deletions schema.example.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ input NewTodo {
type Mutation {
createTodo(input: NewTodo!): Todo!
}

type Course {
}

0 comments on commit c5e4126

Please sign in to comment.