Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.24.0
go-version: ^1.24.2

- name: Check out code
uses: actions/checkout@v4
Expand All @@ -35,6 +35,7 @@ jobs:
- name: Build plugins
run: |
echo "Building plugins"
go mod tidy
go mod download
CGO_ENABLED=1 go build --buildmode=plugin ./gen3_writer
CGO_ENABLED=1 go build --buildmode=plugin ./grip-js
Expand Down
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ENV PATH="/go/bin:${PATH}"
ADD ./ /go/src/github.com/bmeg/grip-graphql
WORKDIR /go/src/github.com/bmeg/grip-graphql

RUN ls -l middleware
RUN pwd

RUN go mod tidy
RUN go mod download

RUN GRIP_VERSION=$(go list -m -json github.com/bmeg/grip | jq -r '.Version') && \
go install github.com/bmeg/grip@$GRIP_VERSION
RUN make all
Expand All @@ -18,5 +24,4 @@ COPY --from=build-env /go/src/github.com/bmeg/grip-graphql/gql-gen.so /data/
COPY --from=build-env /go/src/github.com/bmeg/grip-graphql/gen3_writer.so /data/
COPY --from=build-env /go/src/github.com/bmeg/grip-graphql/grip-js.so /data/
COPY --from=build-env /go/src/github.com/bmeg/grip-graphql/grip-js/config/gen3.js /data/config/
COPY --from=build-env /go/src/github.com/bmeg/grip-graphql/mongo.yml /data/
COPY --from=build-env /go/bin/grip /app/
4 changes: 2 additions & 2 deletions gen3_writer/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TokenAuthMiddleware(jwtHandler middleware.JWTHandler) gin.HandlerFunc {
return
}

anyList, err := jwtHandler.HandleJWTToken(Token, method)
anyList, err := jwtHandler.GetAllowedResources(Token, method, "*")
if err != nil {
RegError(c, c.Writer, c.Param("graph"), err)
return
Expand Down Expand Up @@ -128,7 +128,7 @@ func NewHTTPHandler(client gripql.Client, config map[string]string) (http.Handle

// Since using Grip logging functions, log config needs to be set to properly format JSON data outputs
logConfig := log.Logger{
Level: "info",
Level: "debug",
Formatter: "json",
}
log.ConfigureLogger(logConfig)
Expand Down
34 changes: 18 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
module github.com/bmeg/grip-graphql

go 1.24

toolchain go1.24.2
go 1.24.2

require (
github.com/99designs/gqlgen v0.17.57
github.com/bmeg/grip v0.0.0-20250714173925-c1892d4f63b1
github.com/bmeg/grip v0.0.0-20251202230911-d54d9a03cb7d
github.com/dop251/goja v0.0.0-20240707163329-b1681fb2a2f5
github.com/gin-gonic/gin v1.8.1
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/google/uuid v1.6.0
github.com/graphql-go/graphql v0.8.1
github.com/graphql-go/handler v0.2.4
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/vektah/gqlparser/v2 v2.5.19
golang.org/x/exp v0.0.0-20240707233637-46b078467d37
google.golang.org/protobuf v1.36.5
google.golang.org/protobuf v1.36.7
)

require (
github.com/agnivade/levenshtein v1.2.0 // indirect
github.com/bmeg/jsonpath v0.0.0-20210207014051-cca5355553ad // indirect
github.com/bytedance/sonic v1.14.0 // indirect
github.com/bytedance/sonic/loader v0.3.0 // indirect
github.com/cloudwego/base64x v0.1.5 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/dlclark/regexp2 v1.11.2 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
Expand All @@ -37,15 +37,15 @@ require (
github.com/goccy/go-json v0.10.3 // indirect
github.com/google/pprof v0.0.0-20240711041743-f6c9dda6c6da // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmoiron/sqlx v1.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
Expand All @@ -63,20 +63,22 @@ require (
github.com/segmentio/ksuid v1.0.4 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sosodev/duration v1.3.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
github.com/urfave/cli/v2 v2.27.5 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
golang.org/x/crypto v0.33.0 // indirect
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.35.0 // indirect
golang.org/x/sync v0.11.0 // indirect
golang.org/x/net v0.37.0 // indirect
golang.org/x/sync v0.12.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/term v0.29.0 // indirect
golang.org/x/text v0.22.0 // indirect
golang.org/x/term v0.30.0 // indirect
golang.org/x/text v0.23.0 // indirect
golang.org/x/tools v0.28.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/grpc v1.70.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250811230008-5f3141c8851a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a // indirect
google.golang.org/grpc v1.71.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
Expand Down
Loading
Loading