feat: add subscriptions and rework interfaces

This commit is contained in:
Jon Lundy
2022-08-09 16:23:33 -06:00
parent 82f23ae323
commit 0642879c07
16 changed files with 1368 additions and 627 deletions

View File

@@ -1,7 +1,7 @@
export EV_DATA = mem:
# export EV_HTTP = :8080
export EV_HTTP = :8080
run:
run: gen
go run .
test:
go test -cover -race ./...
@@ -9,10 +9,15 @@ test:
GQLDIR=api/gql_ev
GQLS=$(wildcard $(GQLDIR)/*.go) $(wildcard $(GQLDIR)/*.graphqls) gqlgen.yml
GQLSRC=internal/ev/graph/generated/generated.go
GQLSRC=internal/graph/generated/generated.go
gen: gql
gql: $(GQLSRC)
$(GQLSRC): $(GQLS)
go get github.com/99designs/gqlgen@latest
go run github.com/99designs/gqlgen
ifeq (, $(shell which gqlgen))
go install github.com/99designs/gqlgen@latest
endif
gqlgen
load:
watch -n .1 "http POST localhost:8080/event/asdf/test a=b one=1 two:='{\"v\":2}' | jq"