Skip to content

Commit

Permalink
FEAT: Accounts API Deployed to Prod (#29)
Browse files Browse the repository at this point in the history
* feat: adding graphql service for accounts

* feat: adding support for accounts-graphql schema

* fix: scale machines to 0

* fix: fly.toml

* fix: internal port 8080 in production

* fix: change back to port 3000

* fix: move graph into internal

* feat: code generation for gql

* fix: models

* fix: models

* feat: resolvers are fixed

* feat: updating resolver path

* feat: move schemas into their own directory

* fix: moving models to a package

* feat: adding proper generated files package

* feat: adding apollo router locally for dev

* feat: logged todos resolver is called

* fix: empty resolvers

* fix: moving schema configs to dev

* fix: moving schema configs to dev

* feat: adding apolo router

* feat: super graph dev and prod setup

* feat: remove the custom metrics

* fix: deployment for apollo router

* fix: delete older files

* feat: updating dockerfile for router

* fix: remove homepage

* fix: disable homepage

* fix: disable homepage

* fix: router config

* fix: config

* fix: apollo router config

* fix: dockerfile

* fix: dockerfile slashes

* fix: apollo router prod

* fix: prod

* fix: http service for accounts graphql

* fix: revert back to public prod url

* fix: graphql schema

* feat: account model generation

* feat: update prod graph

* fix: use internal routing

* feat: adding accounts internal

* feat: hide accounts-graphql behind VPC

* feat: graphql service generator

* feat: cleanup graphql files

* fix: file generation

* fix: further cleanup

* fix: remove unwanted package in go workspace

* feat: calling accounts api from accounts graph

* feat: updating supergraph schema with prod
  • Loading branch information
ericzorn93 authored Jan 2, 2025
1 parent 760e256 commit 227b66c
Show file tree
Hide file tree
Showing 18 changed files with 629 additions and 534 deletions.
1 change: 1 addition & 0 deletions apps/services/accounts-graphql/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
AMQP_CONNECTION_URI=""
ACCOUNTS_API_URI=""
2 changes: 1 addition & 1 deletion apps/services/accounts-graphql/cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func run() error {
}

// Set up all ConnectRPC Handlers
srv := handler.New(generated.NewExecutableSchema(generated.Config{Resolvers: &resolvers.Resolver{}}))
srv := handler.New(generated.NewExecutableSchema(generated.Config{Resolvers: resolvers.NewResolver(config)}))
srv.AddTransport(transport.Options{})
srv.AddTransport(transport.GET{})
srv.AddTransport(transport.POST{})
Expand Down
2 changes: 1 addition & 1 deletion apps/services/accounts-graphql/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require (
connectrpc.com/connect v1.17.0
connectrpc.com/validate v0.1.0
github.com/99designs/gqlgen v0.17.61
github.com/google/uuid v1.6.0
github.com/vektah/gqlparser/v2 v2.5.20
google.golang.org/grpc v1.68.1
)
Expand All @@ -19,7 +20,6 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/google/cel-go v0.22.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
Expand Down
6 changes: 4 additions & 2 deletions apps/services/accounts-graphql/internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import (

// Config for the application
type Config struct {
AMQPUrl string
AMQPUrl string
AccountsAPIURI string
}

// NewConfig constructs the config
func NewConfig() (Config, error) {
config := Config{
AMQPUrl: os.Getenv("AMQP_CONNECTION_URI"),
AMQPUrl: os.Getenv("AMQP_CONNECTION_URI"),
AccountsAPIURI: os.Getenv("ACCOUNTS_API_URI"),
}

return config, nil
Expand Down

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

Loading

0 comments on commit 227b66c

Please sign in to comment.