Skip to content

Commit

Permalink
Add source filter for queries. (#11)
Browse files Browse the repository at this point in the history
* Add source filter for queries.

* Add codegen check

* code comments

* clean up arg population

* Remove tokenID from response
  • Loading branch information
KevinJoiner authored May 13, 2024
1 parent da68fb4 commit ae75cb5
Show file tree
Hide file tree
Showing 16 changed files with 2,593 additions and 1,155 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: generate files
on:
pull_request:
branches: [ '**' ]
env:
GOPRIVATE: github.com/DIMO-Network
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
golangci:
runs-on: ubuntu-latest

name: lint
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.22

- name: Checkout code
uses: actions/checkout@v3

- name: go mod tidy
run: go mod tidy

- name: go mod verify
run: go mod verify

- name: install tools
run: make tools

- name: generate graphql files
run: make gql

- name: porcelain
shell: bash
run: |
dirty_files="$(git status --porcelain)"
if [[ `git status --porcelain` ]]; then
echo "The following files are dirty after running generators:"
echo "${dirty_files}"
exit 1
fi
6 changes: 6 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ require (
github.com/rs/zerolog v1.32.0
github.com/stretchr/testify v1.9.0
github.com/vektah/gqlparser/v2 v2.5.11
github.com/volatiletech/sqlboiler/v4 v4.16.2
)

require (
Expand Down Expand Up @@ -43,6 +44,7 @@ require (
github.com/docker/docker v26.0.2+incompatible // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/friendsofgo/errors v0.9.2 // indirect
github.com/go-faster/city v1.0.1 // indirect
github.com/go-faster/errors v0.7.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
Expand Down Expand Up @@ -89,6 +91,7 @@ require (
github.com/shopspring/decimal v1.4.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sosodev/duration v1.2.0 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/testcontainers/testcontainers-go v0.30.0 // indirect
github.com/testcontainers/testcontainers-go/modules/clickhouse v0.30.0 // indirect
github.com/tidwall/gjson v1.17.1 // indirect
Expand All @@ -100,6 +103,8 @@ require (
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.52.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
github.com/volatiletech/inflect v0.0.1 // indirect
github.com/volatiletech/strmangle v0.0.6 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
Expand All @@ -115,6 +120,7 @@ require (
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.20.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.33.0 // indirect
Expand Down
903 changes: 903 additions & 0 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions gqlgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ resolver:
models:
SignalAggregations:
model:
- github.com/DIMO-Network/telemetry-api/internal/graph/model.SignalsWithID
- github.com/DIMO-Network/telemetry-api/internal/graph/model.Signals
SignalCollection:
model:
- github.com/DIMO-Network/telemetry-api/internal/graph/model.SignalsWithID
- github.com/DIMO-Network/telemetry-api/internal/graph/model.Signals
ID:
model:
- github.com/99designs/gqlgen/graphql.ID
Expand Down
38 changes: 28 additions & 10 deletions internal/graph/base.resolvers.go

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

Loading

0 comments on commit ae75cb5

Please sign in to comment.