Compare commits
80 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| af045687ae | |||
| c90ee3c9b1 | |||
| 83e99e7d0a | |||
|
80daed081d
|
|||
| f6e4458efa | |||
| 11b9a46802 | |||
| d2324d27df | |||
| c496ed025e | |||
| 4773ada816 | |||
| 6447a299b3 | |||
| b8e9e0d632 | |||
| 3179bb7ae3 | |||
| 73f6fe31d9 | |||
| 87eab3a04e | |||
| e751d35e38 | |||
| 84e30c0771 | |||
| bdb3b80f4a | |||
| d08c9663fe | |||
| a17b8dd122 | |||
| ae8cf15b0a | |||
| 8fd2c1790b | |||
| fe4efa7b97 | |||
| 78599baa5b | |||
| 8ad47c2e54 | |||
| ecce66b579 | |||
| a26e66649a | |||
| b8b5951883 | |||
| f860d80a81 | |||
| d27331cef0 | |||
|
e343ff7538
|
|||
| 4fe45bf125 | |||
| 89e35c4ee7 | |||
| 0f077a53bb | |||
| 51fd889f6a | |||
| e13c9b1a28 | |||
| 576a530886 | |||
| aa9fea580f | |||
| ccb8a10f92 | |||
| d86beb8308 | |||
| 429cf6e66d | |||
| 2dd0ac9392 | |||
| 780244b165 | |||
|
540e90a577
|
|||
| 1b527bab74 | |||
| 5b64cd0165 | |||
| e2fb56f505 | |||
| 6bdbe36c7f | |||
| 2a1415bc35 | |||
| 8e53b1fbf4 | |||
|
2cf992c948
|
|||
| ca9e7c3aa0 | |||
| db762cb496 | |||
| c33885a0ab | |||
| 1135d77c35 | |||
| d1d14c1097 | |||
| 41075e06a3 | |||
| a7d4c01089 | |||
| 7c30a66144 | |||
| 98c17196c8 | |||
| 6635019035 | |||
| 1ae73e7203 | |||
| 91c02eb499 | |||
| 32fc6b2641 | |||
| ce86af4486 | |||
| 5258a68682 | |||
| 1d69be641c | |||
| 3c571a1dc3 | |||
| 4c16e293c0 | |||
| 18fb8da472 | |||
| c9fa0ecc2c | |||
| 35db2fc74e | |||
| e10ab9d75f | |||
| d6100bcb76 | |||
| 47d122aa8d | |||
| b089801216 | |||
| 3c071cb300 | |||
| 8fe56f6ce0 | |||
| c9aa447a9f | |||
| 575f97e8d1 | |||
| dde2a965ec |
+4
-4
@@ -21,7 +21,7 @@ variables:
|
|||||||
|
|
||||||
check:
|
check:
|
||||||
stage: .pre
|
stage: .pre
|
||||||
image: amd64/golang:1.25.1@sha256:53f7808857782118f3a062261f721507dfa36e5c545e5d39c2dcf9916e3f0b1b
|
image: amd64/golang:1.25.4@sha256:efe81fa41fdf81fb873ab7cd931b9bb29bd10aced6c252cbd91739c34e654f01
|
||||||
script:
|
script:
|
||||||
- go install mvdan.cc/gofumpt@latest
|
- go install mvdan.cc/gofumpt@latest
|
||||||
- go install golang.org/x/tools/cmd/goimports@latest
|
- go install golang.org/x/tools/cmd/goimports@latest
|
||||||
@@ -40,7 +40,7 @@ build:
|
|||||||
|
|
||||||
vulnerabilities:
|
vulnerabilities:
|
||||||
stage: build
|
stage: build
|
||||||
image: amd64/golang:1.25.1@sha256:53f7808857782118f3a062261f721507dfa36e5c545e5d39c2dcf9916e3f0b1b
|
image: amd64/golang:1.25.4@sha256:efe81fa41fdf81fb873ab7cd931b9bb29bd10aced6c252cbd91739c34e654f01
|
||||||
script:
|
script:
|
||||||
- go install golang.org/x/vuln/cmd/govulncheck@latest
|
- go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||||
- govulncheck ./...
|
- govulncheck ./...
|
||||||
@@ -61,7 +61,7 @@ deploy-prod:
|
|||||||
check_release:
|
check_release:
|
||||||
stage: test
|
stage: test
|
||||||
image:
|
image:
|
||||||
name: goreleaser/goreleaser:v2.12.2@sha256:ab11cfd7c8c9af878cdcb66c5b8aa4d16209d155bca264a86d3ccd5a79e9030a
|
name: goreleaser/goreleaser:v2.12.7@sha256:a2a47c0dda85f8d40eaaa5b9765bf76c69addb6060666f8a51441410d9b008e9
|
||||||
entrypoint: [ '' ]
|
entrypoint: [ '' ]
|
||||||
variables:
|
variables:
|
||||||
GOTOOLCHAIN: auto
|
GOTOOLCHAIN: auto
|
||||||
@@ -74,7 +74,7 @@ release:
|
|||||||
needs:
|
needs:
|
||||||
- unbound_release_prepare_release
|
- unbound_release_prepare_release
|
||||||
image:
|
image:
|
||||||
name: goreleaser/goreleaser:v2.12.2@sha256:ab11cfd7c8c9af878cdcb66c5b8aa4d16209d155bca264a86d3ccd5a79e9030a
|
name: goreleaser/goreleaser:v2.12.7@sha256:a2a47c0dda85f8d40eaaa5b9765bf76c69addb6060666f8a51441410d9b008e9
|
||||||
entrypoint: [ '' ]
|
entrypoint: [ '' ]
|
||||||
variables:
|
variables:
|
||||||
# Disable shallow cloning so that goreleaser can diff between tags to
|
# Disable shallow cloning so that goreleaser can diff between tags to
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ homebrew_casks:
|
|||||||
repository:
|
repository:
|
||||||
owner: unboundsoftware
|
owner: unboundsoftware
|
||||||
name: homebrew-taps
|
name: homebrew-taps
|
||||||
binary: schemactl
|
binaries: [schemactl]
|
||||||
directory: Casks
|
directory: Casks
|
||||||
commit_author:
|
commit_author:
|
||||||
name: "Joakim Olsson"
|
name: "Joakim Olsson"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ repos:
|
|||||||
- --project
|
- --project
|
||||||
- unboundsoftware/schemas
|
- unboundsoftware/schemas
|
||||||
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
|
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
|
||||||
rev: v9.22.0
|
rev: v9.23.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: commitlint
|
- id: commitlint
|
||||||
stages: [ commit-msg ]
|
stages: [ commit-msg ]
|
||||||
@@ -37,11 +37,11 @@ repos:
|
|||||||
- id: go-test
|
- id: go-test
|
||||||
- id: gofumpt
|
- id: gofumpt
|
||||||
- repo: https://github.com/golangci/golangci-lint
|
- repo: https://github.com/golangci/golangci-lint
|
||||||
rev: v2.4.0
|
rev: v2.6.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: golangci-lint-full
|
- id: golangci-lint-full
|
||||||
- repo: https://github.com/gitleaks/gitleaks
|
- repo: https://github.com/gitleaks/gitleaks
|
||||||
rev: v8.28.0
|
rev: v8.29.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: gitleaks
|
- id: gitleaks
|
||||||
exclude: '^ctl/generated.go|graph/generated/.*$|^graph/model/models_gen.go|^tools/.*$$'
|
exclude: '^ctl/generated.go|graph/generated/.*$|^graph/model/models_gen.go|^tools/.*$$'
|
||||||
|
|||||||
+423
@@ -1,3 +1,64 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [0.7.0] - 2025-11-19
|
||||||
|
|
||||||
|
### 🚀 Features
|
||||||
|
|
||||||
|
- Add Cosmo Router config generation and PubSub support
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.231
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.232
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.233
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.234
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.235
|
||||||
|
- *(deps)* Update module github.com/vektah/gqlparser/v2 to v2.5.31
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.236
|
||||||
|
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.82
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.237
|
||||||
|
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.83
|
||||||
|
- *(deps)* Update module github.com/alecthomas/kong to v1.13.0
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.238
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- Add git-cliff configuration for changelog generation
|
||||||
|
- *(deps)* Update golang:1.25.3 docker digest to 69d1009
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.12.6
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.12.7
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.6.0
|
||||||
|
- *(deps)* Update golang:1.25.3 docker digest to 9ac0edc
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.6.1
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.29.0
|
||||||
|
- *(deps)* Update golang docker tag to v1.25.4
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.6.2
|
||||||
|
- *(deps)* Update golang:1.25.4 docker digest to efe81fa
|
||||||
|
|
||||||
|
## [0.6.6] - 2025-10-14
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.227
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.228
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.229
|
||||||
|
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.81
|
||||||
|
- *(deps)* Update module github.com/pressly/goose/v3 to v3.26.0
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.230
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.5.0
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.12.3
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.12.4
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.12.5
|
||||||
|
- *(deps)* Update golang:1.25.1 docker digest to 12640a4
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.23.0
|
||||||
|
- *(deps)* Update golang docker tag to v1.25.2
|
||||||
|
- *(deps)* Update golang docker tag to v1.25.3
|
||||||
|
|
||||||
## [0.6.5] - 2025-09-18
|
## [0.6.5] - 2025-09-18
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
@@ -6,11 +67,19 @@
|
|||||||
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.79
|
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.79
|
||||||
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.80
|
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.80
|
||||||
- *(deps)* Update module gitlab.com/unboundsoftware/eventsourced/eventsourced to v1.19.3
|
- *(deps)* Update module gitlab.com/unboundsoftware/eventsourced/eventsourced to v1.19.3
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update pre-commit hook lietu/go-pre-commit to v1
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.12.1
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.12.2
|
||||||
|
|
||||||
## [0.6.4] - 2025-09-11
|
## [0.6.4] - 2025-09-11
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
- *(deps)* Update module gitlab.com/unboundsoftware/eventsourced/amqp to v1.9.0
|
- *(deps)* Update module gitlab.com/unboundsoftware/eventsourced/amqp to v1.9.0
|
||||||
|
|
||||||
## [0.6.3] - 2025-09-09
|
## [0.6.3] - 2025-09-09
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
@@ -24,11 +93,20 @@
|
|||||||
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.224
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.224
|
||||||
- *(deps)* Update module go.opentelemetry.io/contrib/bridges/otelslog to v0.13.0
|
- *(deps)* Update module go.opentelemetry.io/contrib/bridges/otelslog to v0.13.0
|
||||||
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.225
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.225
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update golang:1.25.0 docker digest to f6b9e1a
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.12.0
|
||||||
|
- *(deps)* Update golang docker tag to v1.25.1
|
||||||
|
- *(deps)* Update golang:1.25.1 docker digest to 53f7808
|
||||||
|
|
||||||
## [0.6.2] - 2025-08-22
|
## [0.6.2] - 2025-08-22
|
||||||
|
|
||||||
### ⚙️ Miscellaneous Tasks
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
- Remove conflicts entry from homebrew-taps config
|
- Remove conflicts entry from homebrew-taps config
|
||||||
|
|
||||||
## [0.6.1] - 2025-08-22
|
## [0.6.1] - 2025-08-22
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
@@ -59,6 +137,27 @@
|
|||||||
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.220
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.220
|
||||||
- *(deps)* Update module github.com/sparetimecoders/goamqp to v0.3.3
|
- *(deps)* Update module github.com/sparetimecoders/goamqp to v0.3.3
|
||||||
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.221
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.221
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.2.1
|
||||||
|
- *(deps)* Update golang:1.24.4 docker digest to 9f820b6
|
||||||
|
- *(deps)* Update golang docker tag to v1.24.5
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.11.0
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.2.2
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.28.0
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.3.0
|
||||||
|
- *(deps)* Update golang:1.24.5 docker digest to 0a156a4
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.11.1
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.11.2
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.3.1
|
||||||
|
- *(deps)* Update golang docker tag to v1.24.6
|
||||||
|
- *(deps)* Update pre-commit hook pre-commit/pre-commit-hooks to v6
|
||||||
|
- *(deps)* Update golang:1.24.6 docker digest to 958bfd1
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.4.0
|
||||||
|
- *(deps)* Update golang:1.24.6 docker digest to cd8f653
|
||||||
|
- *(deps)* Update golang docker tag to v1.25.0
|
||||||
|
|
||||||
## [0.6.0] - 2025-06-29
|
## [0.6.0] - 2025-06-29
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
@@ -79,6 +178,11 @@
|
|||||||
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.194
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.194
|
||||||
- *(deps)* Update module github.com/vektah/gqlparser/v2 to v2.5.30
|
- *(deps)* Update module github.com/vektah/gqlparser/v2 to v2.5.30
|
||||||
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.76
|
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.76
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.2.0
|
||||||
|
|
||||||
## [0.5.3] - 2025-06-13
|
## [0.5.3] - 2025-06-13
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
@@ -90,11 +194,17 @@
|
|||||||
### 🚜 Refactor
|
### 🚜 Refactor
|
||||||
|
|
||||||
- Remove Sentry integration and replace with OpenTelemetry
|
- Remove Sentry integration and replace with OpenTelemetry
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update golang:1.24.4 docker digest to 3494bbe
|
||||||
|
|
||||||
## [0.5.2] - 2025-06-09
|
## [0.5.2] - 2025-06-09
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
- *(goreleaser)* Specify binary name in configuration
|
- *(goreleaser)* Specify binary name in configuration
|
||||||
|
|
||||||
## [0.5.1] - 2025-06-09
|
## [0.5.1] - 2025-06-09
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
@@ -111,6 +221,16 @@
|
|||||||
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.184
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.184
|
||||||
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.185
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.185
|
||||||
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.186
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.186
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update golang:1.24.3 docker digest to f255a7d
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.27.0
|
||||||
|
- *(deps)* Update golang docker tag to v1.24.4
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.27.1
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.27.2
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.10.2
|
||||||
|
|
||||||
## [0.5.0] - 2025-05-15
|
## [0.5.0] - 2025-05-15
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
@@ -133,7 +253,17 @@
|
|||||||
|
|
||||||
### ⚙️ Miscellaneous Tasks
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.1.4
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.1.5
|
||||||
|
- *(deps)* Update golang:1.24.2 docker digest to bf7899c
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.25.0
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.9.0
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.25.1
|
||||||
- *(ci)* Update GitLab CI configuration for templates
|
- *(ci)* Update GitLab CI configuration for templates
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.1.6
|
||||||
|
- *(deps)* Update golang docker tag to v1.24.3
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.26.0
|
||||||
|
|
||||||
## [0.4.1] - 2025-04-24
|
## [0.4.1] - 2025-04-24
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
@@ -144,6 +274,12 @@
|
|||||||
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.72
|
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.72
|
||||||
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.171
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.171
|
||||||
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.172
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.172
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.1.1
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.1.2
|
||||||
|
|
||||||
## [0.4.0] - 2025-04-12
|
## [0.4.0] - 2025-04-12
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
@@ -162,6 +298,11 @@
|
|||||||
### 🚜 Refactor
|
### 🚜 Refactor
|
||||||
|
|
||||||
- *(deploy)* Remove cpu and memory limits for schemas
|
- *(deploy)* Remove cpu and memory limits for schemas
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.24.3
|
||||||
|
|
||||||
## [0.3.0] - 2025-04-08
|
## [0.3.0] - 2025-04-08
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
@@ -192,6 +333,25 @@
|
|||||||
- *(deps)* Update eventsourced
|
- *(deps)* Update eventsourced
|
||||||
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.168
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.168
|
||||||
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.169
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.169
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.64.6
|
||||||
|
- *(deps)* Update golang docker tag to v1.24.1
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.22.0
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.64.7
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.8.0
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.8.1
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.64.8
|
||||||
|
- *(deps)* Update golang:1.24.1 docker digest to 5ecf333
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.24.2
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.0.1
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.0.2
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.8.2
|
||||||
|
- *(deps)* Update golang docker tag to v1.24.2
|
||||||
|
- *(deps)* Update golang:1.24.2 docker digest to aebb7df
|
||||||
|
|
||||||
## [0.2.0] - 2025-02-28
|
## [0.2.0] - 2025-02-28
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
@@ -216,8 +376,26 @@
|
|||||||
|
|
||||||
### ⚙️ Miscellaneous Tasks
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.23.3
|
||||||
|
- *(deps)* Update golang:1.23.5 docker digest to e213430
|
||||||
|
- *(deps)* Update dependency go to v1.23.6
|
||||||
|
- *(deps)* Update golang docker tag to v1.23.6
|
||||||
|
- *(deps)* Update golang:1.23.6 docker digest to 958bd2e
|
||||||
|
- *(deps)* Update golang:1.23.6 docker digest to 9271129
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.7.0
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.64.2
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.64.3
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.64.4
|
||||||
- *(go)* Update go version to 1.23.6 and remove toolchain
|
- *(go)* Update go version to 1.23.6 and remove toolchain
|
||||||
|
- *(deps)* Update golang docker tag to v1.24.0
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.64.5
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.21.0
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.24.0
|
||||||
|
- *(deps)* Update golang:1.24.0 docker digest
|
||||||
|
- *(deps)* Update golang:1.24.0 docker digest to a14c5a6
|
||||||
|
- *(deps)* Update golang:1.24.0 docker digest to 58cf31c
|
||||||
- *(docker)* Update base image architecture to amd64
|
- *(docker)* Update base image architecture to amd64
|
||||||
|
|
||||||
## [0.1.1] - 2025-01-24
|
## [0.1.1] - 2025-01-24
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
@@ -228,6 +406,28 @@
|
|||||||
- *(deps)* Update module github.com/pressly/goose/v3 to v3.24.1
|
- *(deps)* Update module github.com/pressly/goose/v3 to v3.24.1
|
||||||
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.63
|
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.63
|
||||||
- *(k8s)* Standardize app label to app.kubernetes.io/name
|
- *(k8s)* Standardize app label to app.kubernetes.io/name
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.63.1
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.63.2
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.5.1
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.63.3
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.63.4
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.23.0
|
||||||
|
- *(deps)* Update golang:1.23.4 docker digest to 3b1a7de
|
||||||
|
- *(deps)* Update golang:1.23.4 docker digest to 08e1417
|
||||||
|
- *(deps)* Update golang:1.23.4 docker digest to 585103a
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.23.1
|
||||||
|
- *(deps)* Update golang:1.23.4 docker digest to 5305905
|
||||||
|
- *(deps)* Update golang:1.23.4 docker digest to 9820aca
|
||||||
|
- *(deps)* Update dependency go to v1.23.5
|
||||||
|
- *(deps)* Update golang docker tag to v1.23.5
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.6.0
|
||||||
|
- *(deps)* Update golang:1.23.5 docker digest to 8c10f21
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.6.1
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.23.2
|
||||||
|
|
||||||
## [0.1.0] - 2025-01-01
|
## [0.1.0] - 2025-01-01
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
@@ -268,8 +468,48 @@
|
|||||||
|
|
||||||
### ⚙️ Miscellaneous Tasks
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.21.2
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.4.1
|
||||||
|
- *(deps)* Pin dependencies
|
||||||
|
- *(deps)* Pin dependencies
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.4.2
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.4.4
|
||||||
|
- *(deps)* Update dependency go to v1.23.3
|
||||||
|
- *(deps)* Update golang docker tag to v1.23.3
|
||||||
|
- *(deps)* Update unbound/pre-commit docker digest to 596abf5
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.62.0
|
||||||
|
- *(deps)* Update golang:1.23.3 docker digest to 8956c08
|
||||||
|
- *(deps)* Update unbound/pre-commit docker digest to e78425c
|
||||||
|
- *(deps)* Update golang:1.23.3 docker digest to 3694e36
|
||||||
|
- *(deps)* Update golang:1.23.3 docker digest to b2ca381
|
||||||
|
- *(deps)* Update golang:1.23.3 docker digest to 2660218
|
||||||
|
- *(deps)* Update golang:1.23.3 docker digest to c2d828f
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.4.5
|
||||||
|
- *(deps)* Update golang:1.23.3 docker digest to 73f06be
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.4.6
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.4.7
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.4.8
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.62.2
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.19.0
|
||||||
|
- *(deps)* Update golang:1.23.3 docker digest to ee5f0ad
|
||||||
|
- *(deps)* Update golang:1.23.3 docker digest to b4aabba
|
||||||
|
- *(deps)* Update golang:1.23.3 docker digest to 2b01164
|
||||||
|
- *(deps)* Update golang:1.23.3 docker digest to 017ec6b
|
||||||
|
- *(deps)* Update dependency go to v1.23.4
|
||||||
|
- *(deps)* Update golang docker tag to v1.23.4
|
||||||
|
- *(deps)* Update golang:1.23.4 docker digest to 574185e
|
||||||
- Remove unnecessary Docker variables from configuration
|
- Remove unnecessary Docker variables from configuration
|
||||||
- *(ci)* Remove unused docker service from buildtools
|
- *(ci)* Remove unused docker service from buildtools
|
||||||
|
- *(deps)* Update golang:1.23.4 docker digest to 7003184
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.5.0
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.20.0
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.21.3
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.21.4
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.22.0
|
||||||
|
- *(deps)* Update golang:1.23.4 docker digest to 7ea4c9d
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.22.1
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.63.0
|
||||||
|
|
||||||
## [0.0.7] - 2024-10-22
|
## [0.0.7] - 2024-10-22
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
@@ -313,10 +553,51 @@
|
|||||||
|
|
||||||
### ⚙️ Miscellaneous Tasks
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update pre-commit hook pre-commit/pre-commit-hooks to v4.6.0
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.15.0
|
||||||
|
- *(deps)* Update dependency go to v1.22.2
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.16.0
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.58.0
|
||||||
|
- *(deps)* Update dependency go to v1.22.3
|
||||||
|
- *(deps)* Update golang docker tag to v1.22.3
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.58.1
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.58.2
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.59.0
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.18.3
|
||||||
|
- *(deps)* Update dependency go to v1.22.4
|
||||||
|
- *(deps)* Update golang docker tag to v1.22.4
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.59.1
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.18.4
|
||||||
|
- *(deps)* Update dependency go to v1.22.5
|
||||||
|
- *(deps)* Update golang docker tag to v1.22.5
|
||||||
|
- *(deps)* Update dependency go to v1.22.6
|
||||||
|
- *(deps)* Update golang docker tag to v1.22.6
|
||||||
|
- *(deps)* Update dependency go to v1.23.0
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.60.1
|
||||||
|
- *(deps)* Update golang docker tag to v1.23.0
|
||||||
- Update golangci-lint hook identifier in pre-commit config
|
- Update golangci-lint hook identifier in pre-commit config
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.60.2
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.60.3
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.17.0
|
||||||
|
- *(deps)* Update dependency go to v1.23.1
|
||||||
|
- *(deps)* Update golang docker tag to v1.23.1
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.61.0
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.18.0
|
||||||
- Update goreleaser image to v2.3.1
|
- Update goreleaser image to v2.3.1
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.19.1
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.19.2
|
||||||
- Add generate check
|
- Add generate check
|
||||||
|
- *(deps)* Update goreleaser/goreleaser docker tag to v2.3.2
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.19.3
|
||||||
|
- *(deps)* Update dependency go to v1.23.2
|
||||||
|
- *(deps)* Update golang docker tag to v1.23.2
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.20.0
|
||||||
|
- *(deps)* Update pre-commit hook pre-commit/pre-commit-hooks to v5
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.20.1
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.21.0
|
||||||
|
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.21.1
|
||||||
- Add release notes for goreleaser command in .gitlab-ci.yml
|
- Add release notes for goreleaser command in .gitlab-ci.yml
|
||||||
|
|
||||||
## [0.0.6] - 2024-04-04
|
## [0.0.6] - 2024-04-04
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
@@ -326,6 +607,8 @@
|
|||||||
### ⚙️ Miscellaneous Tasks
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
- Add step for checking release
|
- Add step for checking release
|
||||||
|
- *(deps)* Update golang docker tag to v1.22.2
|
||||||
|
|
||||||
## [0.0.5] - 2024-04-03
|
## [0.0.5] - 2024-04-03
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
@@ -349,18 +632,110 @@
|
|||||||
|
|
||||||
### ⚙️ Miscellaneous Tasks
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Bump github.com/stretchr/testify from 1.8.3 to 1.8.4
|
||||||
- Update golangci-lint
|
- Update golangci-lint
|
||||||
|
- *(deps)* Bump golang from 1.20.4 to 1.20.5
|
||||||
- Update Go version for vulnerabilities
|
- Update Go version for vulnerabilities
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.31 to 0.17.32
|
||||||
|
- *(deps)* Bump github.com/wundergraph/graphql-go-tools
|
||||||
|
- *(deps)* Bump github.com/vektah/gqlparser/v2
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.32 to 0.17.33
|
||||||
|
- *(deps)* Bump github.com/getsentry/sentry-go from 0.21.0 to 0.22.0
|
||||||
|
- *(deps)* Bump github.com/alecthomas/kong from 0.7.1 to 0.8.0
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.33 to 0.17.34
|
||||||
|
- *(deps)* Bump github.com/vektah/gqlparser/v2 from 2.5.3 to 2.5.5
|
||||||
|
- *(deps)* Bump github.com/vektah/gqlparser/v2 from 2.5.5 to 2.5.6
|
||||||
|
- *(deps)* Bump github.com/pressly/goose/v3 from 3.11.2 to 3.13.0
|
||||||
|
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.1.4 to 0.1.5
|
||||||
|
- *(deps)* Bump github.com/pressly/goose/v3 from 3.13.0 to 3.13.1
|
||||||
|
- *(deps)* Bump github.com/pressly/goose/v3 from 3.13.1 to 3.13.4
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/pg
|
||||||
|
- *(deps)* Bump github.com/wundergraph/graphql-go-tools
|
||||||
|
- *(deps)* Bump golang from 1.20.5 to 1.20.6
|
||||||
|
- *(deps)* Bump github.com/vektah/gqlparser/v2 from 2.5.6 to 2.5.7
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.34 to 0.17.35
|
||||||
|
- *(deps)* Bump github.com/vektah/gqlparser/v2 from 2.5.7 to 2.5.8
|
||||||
|
- *(deps)* Bump github.com/wundergraph/graphql-go-tools
|
||||||
|
- *(deps)* Bump github.com/pressly/goose/v3 from 3.13.4 to 3.14.0
|
||||||
|
- *(deps)* Bump github.com/wundergraph/graphql-go-tools
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.35 to 0.17.36
|
||||||
|
- *(deps)* Bump github.com/wundergraph/graphql-go-tools
|
||||||
|
- *(deps)* Bump github.com/getsentry/sentry-go from 0.22.0 to 0.23.0
|
||||||
|
- *(deps)* Bump golang from 1.20.6 to 1.20.7
|
||||||
- Update to Go 1.20.7
|
- Update to Go 1.20.7
|
||||||
|
- *(deps)* Bump github.com/wundergraph/graphql-go-tools
|
||||||
|
- *(deps)* Bump github.com/wundergraph/graphql-go-tools
|
||||||
|
- *(deps)* Bump golang from 1.20.7 to 1.21.0
|
||||||
|
- *(deps)* Bump github.com/pressly/goose/v3 from 3.14.0 to 3.15.0
|
||||||
|
- *(deps)* Bump github.com/wundergraph/graphql-go-tools
|
||||||
- Update to Golang 1.21.0 for vulnerabilities
|
- Update to Golang 1.21.0 for vulnerabilities
|
||||||
- Update pre-commit versions
|
- Update pre-commit versions
|
||||||
|
- *(deps)* Bump github.com/getsentry/sentry-go from 0.23.0 to 0.24.0
|
||||||
|
- *(deps)* Bump github.com/rs/cors from 1.9.0 to 1.10.0
|
||||||
|
- *(deps)* Bump golang from 1.21.0 to 1.21.1
|
||||||
- Update to Go 1.21.1 for vulnerabilities
|
- Update to Go 1.21.1 for vulnerabilities
|
||||||
|
- *(deps)* Bump github.com/vektah/gqlparser/v2 from 2.5.8 to 2.5.9
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.36 to 0.17.37
|
||||||
|
- *(deps)* Bump github.com/getsentry/sentry-go from 0.24.0 to 0.24.1
|
||||||
|
- *(deps)* Bump github.com/vektah/gqlparser/v2 from 2.5.9 to 2.5.10
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.37 to 0.17.38
|
||||||
|
- *(deps)* Bump github.com/wundergraph/graphql-go-tools
|
||||||
|
- *(deps)* Bump github.com/rs/cors from 1.10.0 to 1.10.1
|
||||||
|
- *(deps)* Bump github.com/getsentry/sentry-go from 0.24.1 to 0.25.0
|
||||||
|
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.1.5 to 0.2.0
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.38 to 0.17.39
|
||||||
|
- *(deps)* Bump golang from 1.21.1 to 1.21.2
|
||||||
|
- *(deps)* Bump github.com/pressly/goose/v3 from 3.15.0 to 3.15.1
|
||||||
|
- *(deps)* Bump golang from 1.21.2 to 1.21.3
|
||||||
|
- *(deps)* Bump github.com/alecthomas/kong from 0.8.0 to 0.8.1
|
||||||
|
- *(deps)* Bump github.com/wundergraph/graphql-go-tools
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.39 to 0.17.40
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/eventsourced
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/pg
|
||||||
|
- *(deps)* Bump golang from 1.21.3 to 1.21.4
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/pg
|
||||||
|
- *(deps)* Bump github.com/pressly/goose/v3 from 3.15.1 to 3.16.0
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/pg
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/pg
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.40 to 0.17.41
|
||||||
|
- *(deps)* Bump github.com/auth0/go-jwt-middleware/v2
|
||||||
|
- *(deps)* Bump golang from 1.21.4 to 1.21.5
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/pg
|
||||||
|
- *(deps)* Bump github.com/pressly/goose/v3 from 3.16.0 to 3.17.0
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/pg
|
||||||
|
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.2.0 to 0.2.1
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.41 to 0.17.42
|
||||||
|
- *(deps)* Bump golang from 1.21.5 to 1.21.6
|
||||||
|
- *(deps)* Bump github.com/getsentry/sentry-go from 0.25.0 to 0.26.0
|
||||||
|
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.2.1 to 0.3.0
|
||||||
|
- *(deps)* Bump github.com/vektah/gqlparser/v2 from 2.5.10 to 2.5.11
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.42 to 0.17.43
|
||||||
|
- *(deps)* Bump github.com/auth0/go-jwt-middleware/v2
|
||||||
|
- *(deps)* Bump github.com/wundergraph/graphql-go-tools
|
||||||
|
- *(deps)* Bump github.com/pressly/goose/v3 from 3.17.0 to 3.18.0
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/eventsourced
|
||||||
|
- *(deps)* Bump golang from 1.21.6 to 1.22.0
|
||||||
|
- *(deps)* Bump github.com/getsentry/sentry-go from 0.26.0 to 0.27.0
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.43 to 0.17.44
|
||||||
|
- *(deps)* Update pre-commit hook devopshq/gitlab-ci-linter to v1.0.6
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.11.0
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.56.2
|
||||||
|
- *(deps)* Update pre-commit hook lietu/go-pre-commit to v0.1.0
|
||||||
|
- *(deps)* Update pre-commit hook pre-commit/pre-commit-hooks to v4.5.0
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.12.0
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.13.0
|
||||||
- Use OrbStack for local dev
|
- Use OrbStack for local dev
|
||||||
|
- *(deps)* Update golang docker tag to v1.22.1
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.57.0
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.57.1
|
||||||
- Add gitleaks to pre-commit setup
|
- Add gitleaks to pre-commit setup
|
||||||
- Update resources
|
- Update resources
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.57.2
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.14.0
|
||||||
- Run release on medium instance
|
- Run release on medium instance
|
||||||
- Back to small and upgrade goreleaser
|
- Back to small and upgrade goreleaser
|
||||||
- Remove deprecated replacements
|
- Remove deprecated replacements
|
||||||
|
|
||||||
## [0.0.4] - 2023-05-29
|
## [0.0.4] - 2023-05-29
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
@@ -369,9 +744,20 @@
|
|||||||
|
|
||||||
### ⚙️ Miscellaneous Tasks
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Bump golang from 1.20.3 to 1.20.4
|
||||||
|
- *(deps)* Bump github.com/pressly/goose/v3 from 3.10.0 to 3.11.0
|
||||||
- Update Go version for vulnerabilities
|
- Update Go version for vulnerabilities
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.30 to 0.17.31
|
||||||
|
- *(deps)* Bump github.com/Khan/genqlient from 0.5.0 to 0.6.0
|
||||||
|
- *(deps)* Bump github.com/getsentry/sentry-go from 0.20.0 to 0.21.0
|
||||||
|
- *(deps)* Bump github.com/pressly/goose/v3 from 3.11.0 to 3.11.2
|
||||||
|
- *(deps)* Bump github.com/wundergraph/graphql-go-tools
|
||||||
|
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.1.3 to 0.1.4
|
||||||
|
- *(deps)* Bump github.com/wundergraph/graphql-go-tools
|
||||||
- Update pre-commit and fix golangci-lint
|
- Update pre-commit and fix golangci-lint
|
||||||
|
- *(deps)* Bump github.com/stretchr/testify from 1.8.2 to 1.8.3
|
||||||
- Actually validate API key privileges and refs
|
- Actually validate API key privileges and refs
|
||||||
|
|
||||||
## [0.0.3] - 2023-04-27
|
## [0.0.3] - 2023-04-27
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
@@ -388,26 +774,61 @@
|
|||||||
|
|
||||||
- Update schema if URLs have changed
|
- Update schema if URLs have changed
|
||||||
- Add pre-commit and remove those checks from Dockerfile
|
- Add pre-commit and remove those checks from Dockerfile
|
||||||
|
- *(deps)* Bump github.com/alecthomas/kong from 0.6.1 to 0.7.1
|
||||||
|
- *(deps)* Bump github.com/stretchr/testify from 1.8.0 to 1.8.1
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.20 to 0.17.22
|
||||||
|
- *(deps)* Bump github.com/getsentry/sentry-go from 0.14.0 to 0.16.0
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/eventsourced
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/amqp
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/pg
|
||||||
- Add context and error handling
|
- Add context and error handling
|
||||||
|
- *(deps)* Bump github.com/rs/cors from 1.8.2 to 1.8.3
|
||||||
- Move to default ingress group
|
- Move to default ingress group
|
||||||
- Decrease trace sample rate
|
- Decrease trace sample rate
|
||||||
- Improve docker caching
|
- Improve docker caching
|
||||||
|
- *(deps)* Bump golang from 1.19.4 to 1.19.5
|
||||||
|
- *(deps)* Bump github.com/getsentry/sentry-go from 0.16.0 to 0.17.0
|
||||||
- Add local module to pre-commit config
|
- Add local module to pre-commit config
|
||||||
- Only ignore generated files with do not edit
|
- Only ignore generated files with do not edit
|
||||||
- Default ingress group
|
- Default ingress group
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/eventsourced
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/eventsourced
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.22 to 0.17.24
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/eventsourced
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/pg
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/pg
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/eventsourced
|
||||||
|
- *(deps)* Bump golang from 1.19.5 to 1.20.0
|
||||||
- Use Docker DinD version from variable
|
- Use Docker DinD version from variable
|
||||||
|
- *(deps)* Bump github.com/getsentry/sentry-go from 0.17.0 to 0.18.0
|
||||||
- Switch to manual rebases for Dependabot
|
- Switch to manual rebases for Dependabot
|
||||||
|
- *(deps)* Bump golang from 1.20.0 to 1.20.1
|
||||||
- Update to golang 1.20.1
|
- Update to golang 1.20.1
|
||||||
|
- *(deps)* Bump github.com/stretchr/testify from 1.8.1 to 1.8.2
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.24 to 0.17.25
|
||||||
|
- *(deps)* Bump github.com/getsentry/sentry-go from 0.18.0 to 0.19.0
|
||||||
|
- *(deps)* Bump golang from 1.20.1 to 1.20.2
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.25 to 0.17.26
|
||||||
- Update Go verion for vulnerabilities scan
|
- Update Go verion for vulnerabilities scan
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.26 to 0.17.27
|
||||||
- Reduce sample rate
|
- Reduce sample rate
|
||||||
|
- *(deps)* Bump github.com/getsentry/sentry-go from 0.19.0 to 0.20.0
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.27 to 0.17.28
|
||||||
|
- *(deps)* Bump golang from 1.20.2 to 1.20.3
|
||||||
- Update to Go 1.20.3
|
- Update to Go 1.20.3
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.28 to 0.17.29
|
||||||
|
- *(deps)* Bump github.com/rs/cors from 1.8.3 to 1.9.0
|
||||||
|
- *(deps)* Bump gitlab.com/unboundsoftware/eventsourced/pg
|
||||||
|
- *(deps)* Bump github.com/99designs/gqlgen from 0.17.29 to 0.17.30
|
||||||
- Fix Gitlab CI lint
|
- Fix Gitlab CI lint
|
||||||
|
|
||||||
## [0.0.2] - 2022-10-14
|
## [0.0.2] - 2022-10-14
|
||||||
|
|
||||||
### ⚙️ Miscellaneous Tasks
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
- Add docker ignore
|
- Add docker ignore
|
||||||
- Handle push of unchanged schema
|
- Handle push of unchanged schema
|
||||||
|
|
||||||
## [0.0.1] - 2022-10-09
|
## [0.0.1] - 2022-10-09
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
@@ -417,3 +838,5 @@
|
|||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
- Remove GITLAB_TOKEN
|
- Remove GITLAB_TOKEN
|
||||||
|
|
||||||
|
<!-- generated by git-cliff -->
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
FROM amd64/golang:1.25.1@sha256:53f7808857782118f3a062261f721507dfa36e5c545e5d39c2dcf9916e3f0b1b as modules
|
FROM amd64/golang:1.25.4@sha256:efe81fa41fdf81fb873ab7cd931b9bb29bd10aced6c252cbd91739c34e654f01 as modules
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
ADD go.* /build
|
ADD go.* /build
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|||||||
+80
@@ -0,0 +1,80 @@
|
|||||||
|
# git-cliff ~ default configuration file
|
||||||
|
# https://git-cliff.org/docs/configuration
|
||||||
|
#
|
||||||
|
# Lines starting with "#" are comments.
|
||||||
|
# Configuration options are organized into tables and keys.
|
||||||
|
# See documentation for more information on available options.
|
||||||
|
|
||||||
|
[changelog]
|
||||||
|
# template for the changelog header
|
||||||
|
header = """
|
||||||
|
# Changelog\n
|
||||||
|
All notable changes to this project will be documented in this file.\n
|
||||||
|
"""
|
||||||
|
# template for the changelog body
|
||||||
|
# https://keats.github.io/tera/docs/#introduction
|
||||||
|
body = """
|
||||||
|
{% if version %}\
|
||||||
|
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
|
||||||
|
{% else %}\
|
||||||
|
## [unreleased]
|
||||||
|
{% endif %}\
|
||||||
|
{% for group, commits in commits | group_by(attribute="group") %}
|
||||||
|
### {{ group | striptags | trim | upper_first }}
|
||||||
|
{% for commit in commits %}
|
||||||
|
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
|
||||||
|
{% if commit.breaking %}[**breaking**] {% endif %}\
|
||||||
|
{{ commit.message | upper_first }}\
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}\n
|
||||||
|
"""
|
||||||
|
# template for the changelog footer
|
||||||
|
footer = """
|
||||||
|
<!-- generated by git-cliff -->
|
||||||
|
"""
|
||||||
|
# remove the leading and trailing s
|
||||||
|
trim = true
|
||||||
|
# postprocessors
|
||||||
|
postprocessors = [
|
||||||
|
# { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
|
||||||
|
]
|
||||||
|
# render body even when there are no releases to process
|
||||||
|
# render_always = true
|
||||||
|
# output file path
|
||||||
|
# output = "test.md"
|
||||||
|
|
||||||
|
[git]
|
||||||
|
# parse the commits based on https://www.conventionalcommits.org
|
||||||
|
conventional_commits = true
|
||||||
|
# filter out the commits that are not conventional
|
||||||
|
filter_unconventional = true
|
||||||
|
# process each line of a commit as an individual commit
|
||||||
|
split_commits = false
|
||||||
|
# regex for preprocessing the commit messages
|
||||||
|
commit_preprocessors = [
|
||||||
|
# Replace issue numbers
|
||||||
|
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
|
||||||
|
# Check spelling of the commit with https://github.com/crate-ci/typos
|
||||||
|
# If the spelling is incorrect, it will be automatically fixed.
|
||||||
|
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
|
||||||
|
]
|
||||||
|
# regex for parsing and grouping commits
|
||||||
|
commit_parsers = [
|
||||||
|
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
|
||||||
|
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
|
||||||
|
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
|
||||||
|
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
|
||||||
|
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
|
||||||
|
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
|
||||||
|
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
|
||||||
|
{ message = "^chore\\(release\\): prepare for", skip = true },
|
||||||
|
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
|
||||||
|
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
|
||||||
|
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
|
||||||
|
]
|
||||||
|
# filter out the commits that are not matched by commit parsers
|
||||||
|
filter_commits = false
|
||||||
|
# sort the tags topologically
|
||||||
|
topo_order = false
|
||||||
|
# sort the commits inside sections by oldest/newest order
|
||||||
|
sort_commits = "oldest"
|
||||||
@@ -195,6 +195,7 @@ func start(closeEvents chan error, logger *slog.Logger, connectToAmqpFunc func(u
|
|||||||
Publisher: eventPublisher,
|
Publisher: eventPublisher,
|
||||||
Logger: logger,
|
Logger: logger,
|
||||||
Cache: serviceCache,
|
Cache: serviceCache,
|
||||||
|
PubSub: graph.NewPubSub(),
|
||||||
}
|
}
|
||||||
|
|
||||||
config := generated.Config{
|
config := generated.Config{
|
||||||
|
|||||||
@@ -3,20 +3,20 @@ module gitlab.com/unboundsoftware/schemas
|
|||||||
go 1.25
|
go 1.25
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/99designs/gqlgen v0.17.80
|
github.com/99designs/gqlgen v0.17.83
|
||||||
github.com/Khan/genqlient v0.8.1
|
github.com/Khan/genqlient v0.8.1
|
||||||
github.com/alecthomas/kong v1.12.1
|
github.com/alecthomas/kong v1.13.0
|
||||||
github.com/apex/log v1.9.0
|
github.com/apex/log v1.9.0
|
||||||
github.com/auth0/go-jwt-middleware/v2 v2.3.0
|
github.com/auth0/go-jwt-middleware/v2 v2.3.0
|
||||||
github.com/golang-jwt/jwt/v5 v5.3.0
|
github.com/golang-jwt/jwt/v5 v5.3.0
|
||||||
github.com/jmoiron/sqlx v1.4.0
|
github.com/jmoiron/sqlx v1.4.0
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
github.com/pressly/goose/v3 v3.25.0
|
github.com/pressly/goose/v3 v3.26.0
|
||||||
github.com/rs/cors v1.11.1
|
github.com/rs/cors v1.11.1
|
||||||
github.com/sparetimecoders/goamqp v0.3.3
|
github.com/sparetimecoders/goamqp v0.3.3
|
||||||
github.com/stretchr/testify v1.11.1
|
github.com/stretchr/testify v1.11.1
|
||||||
github.com/vektah/gqlparser/v2 v2.5.30
|
github.com/vektah/gqlparser/v2 v2.5.31
|
||||||
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.226
|
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.238
|
||||||
gitlab.com/unboundsoftware/eventsourced/amqp v1.9.0
|
gitlab.com/unboundsoftware/eventsourced/amqp v1.9.0
|
||||||
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.19.3
|
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.19.3
|
||||||
gitlab.com/unboundsoftware/eventsourced/pg v1.17.0
|
gitlab.com/unboundsoftware/eventsourced/pg v1.17.0
|
||||||
@@ -37,7 +37,6 @@ require (
|
|||||||
github.com/buger/jsonparser v1.1.1 // indirect
|
github.com/buger/jsonparser v1.1.1 // indirect
|
||||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
|
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/go-logr/logr v1.4.3 // indirect
|
github.com/go-logr/logr v1.4.3 // indirect
|
||||||
github.com/go-logr/stdr v1.2.2 // indirect
|
github.com/go-logr/stdr v1.2.2 // indirect
|
||||||
@@ -50,30 +49,28 @@ require (
|
|||||||
github.com/mfridman/interpolate v0.0.2 // indirect
|
github.com/mfridman/interpolate v0.0.2 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/rabbitmq/amqp091-go v1.10.0 // indirect
|
github.com/rabbitmq/amqp091-go v1.10.0 // indirect
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
|
||||||
github.com/sethvargo/go-retry v0.3.0 // indirect
|
github.com/sethvargo/go-retry v0.3.0 // indirect
|
||||||
github.com/sosodev/duration v1.3.1 // indirect
|
github.com/sosodev/duration v1.3.1 // indirect
|
||||||
github.com/tidwall/gjson v1.17.0 // indirect
|
github.com/tidwall/gjson v1.17.0 // indirect
|
||||||
github.com/tidwall/match v1.1.1 // indirect
|
github.com/tidwall/match v1.1.1 // indirect
|
||||||
github.com/tidwall/pretty v1.2.1 // indirect
|
github.com/tidwall/pretty v1.2.1 // indirect
|
||||||
github.com/tidwall/sjson v1.2.5 // indirect
|
github.com/tidwall/sjson v1.2.5 // indirect
|
||||||
github.com/urfave/cli/v2 v2.27.7 // indirect
|
github.com/urfave/cli/v3 v3.6.0 // indirect
|
||||||
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083 // indirect
|
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083 // indirect
|
||||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
|
|
||||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
|
||||||
go.opentelemetry.io/otel/metric v1.38.0 // indirect
|
go.opentelemetry.io/otel/metric v1.38.0 // indirect
|
||||||
go.opentelemetry.io/proto/otlp v1.7.1 // indirect
|
go.opentelemetry.io/proto/otlp v1.7.1 // indirect
|
||||||
go.uber.org/multierr v1.11.0 // indirect
|
go.uber.org/multierr v1.11.0 // indirect
|
||||||
golang.org/x/mod v0.28.0 // indirect
|
golang.org/x/mod v0.29.0 // indirect
|
||||||
golang.org/x/net v0.44.0 // indirect
|
golang.org/x/net v0.46.0 // indirect
|
||||||
golang.org/x/sync v0.17.0 // indirect
|
golang.org/x/sync v0.17.0 // indirect
|
||||||
golang.org/x/sys v0.36.0 // indirect
|
golang.org/x/sys v0.37.0 // indirect
|
||||||
golang.org/x/text v0.29.0 // indirect
|
golang.org/x/text v0.30.0 // indirect
|
||||||
golang.org/x/tools v0.37.0 // indirect
|
golang.org/x/tools v0.38.0 // indirect
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 // indirect
|
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 // indirect
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect
|
||||||
google.golang.org/grpc v1.75.0 // indirect
|
google.golang.org/grpc v1.75.0 // indirect
|
||||||
google.golang.org/protobuf v1.36.9 // indirect
|
google.golang.org/protobuf v1.36.10 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||||
github.com/99designs/gqlgen v0.17.80 h1:S64VF9SK+q3JjQbilgdrM0o4iFQgB54mVQ3QvXEO4Ek=
|
github.com/99designs/gqlgen v0.17.83 h1:LZOd4Of2snK5V22/ZWfBAPa3WoAZkBO70dKXM0ODHQk=
|
||||||
github.com/99designs/gqlgen v0.17.80/go.mod h1:vgNcZlLwemsUhYim4dC1pvFP5FX0pr2Y+uYUoHFb1ig=
|
github.com/99designs/gqlgen v0.17.83/go.mod h1:q6Lb64wknFqNFSbSUGzKRKupklvY/xgNr62g0GGWPB8=
|
||||||
github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU=
|
github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU=
|
||||||
github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
|
github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
|
||||||
github.com/Khan/genqlient v0.8.1 h1:wtOCc8N9rNynRLXN3k3CnfzheCUNKBcvXmVv5zt6WCs=
|
github.com/Khan/genqlient v0.8.1 h1:wtOCc8N9rNynRLXN3k3CnfzheCUNKBcvXmVv5zt6WCs=
|
||||||
@@ -12,10 +12,10 @@ github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KO
|
|||||||
github.com/agnivade/levenshtein v1.2.1/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU=
|
github.com/agnivade/levenshtein v1.2.1/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU=
|
||||||
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
|
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
|
||||||
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
|
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
|
||||||
github.com/alecthomas/kong v1.12.1 h1:iq6aMJDcFYP9uFrLdsiZQ2ZMmcshduyGv4Pek0MQPW0=
|
github.com/alecthomas/kong v1.13.0 h1:5e/7XC3ugvhP1DQBmTS+WuHtCbcv44hsohMgcvVxSrA=
|
||||||
github.com/alecthomas/kong v1.12.1/go.mod h1:p2vqieVMeTAnaC83txKtXe8FLke2X07aruPWXyMPQrU=
|
github.com/alecthomas/kong v1.13.0/go.mod h1:wrlbXem1CWqUV5Vbmss5ISYhsVPkBb1Yo7YKJghju2I=
|
||||||
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
|
github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs=
|
||||||
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
|
github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
|
||||||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
|
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
|
||||||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
|
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
|
||||||
github.com/andybalholm/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kktS1LM=
|
github.com/andybalholm/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kktS1LM=
|
||||||
@@ -37,8 +37,6 @@ github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1x
|
|||||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo=
|
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@@ -115,8 +113,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
|||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/pressly/goose/v3 v3.25.0 h1:6WeYhMWGRCzpyd89SpODFnCBCKz41KrVbRT58nVjGng=
|
github.com/pressly/goose/v3 v3.26.0 h1:KJakav68jdH0WDvoAcj8+n61WqOIaPGgH0bJWS6jpmM=
|
||||||
github.com/pressly/goose/v3 v3.25.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY=
|
github.com/pressly/goose/v3 v3.26.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY=
|
||||||
github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw=
|
github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw=
|
||||||
github.com/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
|
github.com/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
|
||||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||||
@@ -126,8 +124,6 @@ github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0t
|
|||||||
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||||
github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA=
|
github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA=
|
||||||
github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
|
github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
|
||||||
github.com/sanity-io/litter v1.5.8 h1:uM/2lKrWdGbRXDrIq08Lh9XtVYoeGtcQxk9rtQ7+rYg=
|
github.com/sanity-io/litter v1.5.8 h1:uM/2lKrWdGbRXDrIq08Lh9XtVYoeGtcQxk9rtQ7+rYg=
|
||||||
github.com/sanity-io/litter v1.5.8/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U=
|
github.com/sanity-io/litter v1.5.8/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U=
|
||||||
github.com/sebdah/goldie/v2 v2.7.1 h1:PkBHymaYdtvEkZV7TmyqKxdmn5/Vcj+8TpATWZjnG5E=
|
github.com/sebdah/goldie/v2 v2.7.1 h1:PkBHymaYdtvEkZV7TmyqKxdmn5/Vcj+8TpATWZjnG5E=
|
||||||
@@ -166,16 +162,14 @@ github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj
|
|||||||
github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0=
|
github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0=
|
||||||
github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=
|
github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=
|
||||||
github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=
|
github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=
|
||||||
github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU=
|
github.com/urfave/cli/v3 v3.6.0 h1:oIdArVjkdIXHWg3iqxgmqwQGC8NM0JtdgwQAj2sRwFo=
|
||||||
github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4=
|
github.com/urfave/cli/v3 v3.6.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso=
|
||||||
github.com/vektah/gqlparser/v2 v2.5.30 h1:EqLwGAFLIzt1wpx1IPpY67DwUujF1OfzgEyDsLrN6kE=
|
github.com/vektah/gqlparser/v2 v2.5.31 h1:YhWGA1mfTjID7qJhd1+Vxhpk5HTgydrGU9IgkWBTJ7k=
|
||||||
github.com/vektah/gqlparser/v2 v2.5.30/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo=
|
github.com/vektah/gqlparser/v2 v2.5.31/go.mod h1:c1I28gSOVNzlfc4WuDlqU7voQnsqI6OG2amkBAFmgts=
|
||||||
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083 h1:8/D7f8gKxTBjW+SZK4mhxTTBVpxcqeBgWF1Rfmltbfk=
|
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083 h1:8/D7f8gKxTBjW+SZK4mhxTTBVpxcqeBgWF1Rfmltbfk=
|
||||||
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083/go.mod h1:eOTL6acwctsN4F3b7YE+eE2t8zcJ/doLm9sZzsxxxrE=
|
github.com/wundergraph/astjson v0.0.0-20250106123708-be463c97e083/go.mod h1:eOTL6acwctsN4F3b7YE+eE2t8zcJ/doLm9sZzsxxxrE=
|
||||||
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.226 h1:3g6KNCG4ydgnpZnIlCK7pmtv0FSge6ILUS5LjrNZNiI=
|
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.238 h1:ll0BtYVMziRa8v0T/f+DQOJ/1x3Dq5puifJNnxF0R+M=
|
||||||
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.226/go.mod h1:g1IFIylu5Fd9pKjzq0mDvpaKhEB/vkwLAIbGdX2djXU=
|
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.238/go.mod h1:ErOQH1ki2+SZB8JjpTyGVnoBpg5picIyjvuWQJP4abg=
|
||||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
|
|
||||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
|
|
||||||
gitlab.com/unboundsoftware/eventsourced/amqp v1.9.0 h1:TdBJnrnrxJrPhC4i6KTFUElZa3k/fFXiGwg0sds5aAo=
|
gitlab.com/unboundsoftware/eventsourced/amqp v1.9.0 h1:TdBJnrnrxJrPhC4i6KTFUElZa3k/fFXiGwg0sds5aAo=
|
||||||
gitlab.com/unboundsoftware/eventsourced/amqp v1.9.0/go.mod h1:VauAph7uCvEakYNdHkkSAoOOGKvEuUA/uhsR376ThbI=
|
gitlab.com/unboundsoftware/eventsourced/amqp v1.9.0/go.mod h1:VauAph7uCvEakYNdHkkSAoOOGKvEuUA/uhsR376ThbI=
|
||||||
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.19.3 h1:0HbDHF4sHfoyDrbPLMFWvsQLbTl2ITrpI9PjDIZsV1Y=
|
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.19.3 h1:0HbDHF4sHfoyDrbPLMFWvsQLbTl2ITrpI9PjDIZsV1Y=
|
||||||
@@ -218,17 +212,17 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
|||||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
|
golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=
|
||||||
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
|
golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=
|
||||||
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o=
|
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o=
|
||||||
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8=
|
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8=
|
||||||
golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U=
|
golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA=
|
||||||
golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI=
|
golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
|
golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4=
|
||||||
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
|
golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
|
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
|
||||||
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||||
@@ -236,15 +230,15 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h
|
|||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
|
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
|
||||||
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
|
golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
|
||||||
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
|
golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
|
golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=
|
||||||
golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=
|
golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=
|
||||||
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
|
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
|
||||||
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
|
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 h1:BIRfGDEjiHRrk0QKZe3Xv2ieMhtgRGeLcZQ0mIVn4EY=
|
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 h1:BIRfGDEjiHRrk0QKZe3Xv2ieMhtgRGeLcZQ0mIVn4EY=
|
||||||
@@ -253,8 +247,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 h1:
|
|||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5/go.mod h1:M4/wBTSeyLxupu3W3tJtOgB14jILAS/XWPSSa3TAlJc=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5/go.mod h1:M4/wBTSeyLxupu3W3tJtOgB14jILAS/XWPSSa3TAlJc=
|
||||||
google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4=
|
google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4=
|
||||||
google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
|
google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
|
||||||
google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
|
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
|
||||||
google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
|
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package graph
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"gitlab.com/unboundsoftware/schemas/graph/model"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GenerateCosmoRouterConfig generates a Cosmo Router execution config from subgraphs
|
||||||
|
func GenerateCosmoRouterConfig(subGraphs []*model.SubGraph) (string, error) {
|
||||||
|
// Build the Cosmo router config structure
|
||||||
|
// This is a simplified version - you may need to adjust based on actual Cosmo requirements
|
||||||
|
config := map[string]interface{}{
|
||||||
|
"version": "1",
|
||||||
|
"subgraphs": convertSubGraphsToCosmo(subGraphs),
|
||||||
|
// Add other Cosmo-specific configuration as needed
|
||||||
|
}
|
||||||
|
|
||||||
|
// Marshal to JSON
|
||||||
|
configJSON, err := json.MarshalIndent(config, "", " ")
|
||||||
|
if err != nil {
|
||||||
|
return "", fmt.Errorf("marshal cosmo config: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return string(configJSON), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func convertSubGraphsToCosmo(subGraphs []*model.SubGraph) []map[string]interface{} {
|
||||||
|
cosmoSubgraphs := make([]map[string]interface{}, 0, len(subGraphs))
|
||||||
|
|
||||||
|
for _, sg := range subGraphs {
|
||||||
|
cosmoSg := map[string]interface{}{
|
||||||
|
"name": sg.Service,
|
||||||
|
"sdl": sg.Sdl,
|
||||||
|
}
|
||||||
|
|
||||||
|
if sg.URL != nil {
|
||||||
|
cosmoSg["routing_url"] = *sg.URL
|
||||||
|
}
|
||||||
|
|
||||||
|
if sg.WsURL != nil {
|
||||||
|
cosmoSg["subscription"] = map[string]interface{}{
|
||||||
|
"url": *sg.WsURL,
|
||||||
|
"protocol": "ws",
|
||||||
|
"websocket_subprotocol": "graphql-ws",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cosmoSubgraphs = append(cosmoSubgraphs, cosmoSg)
|
||||||
|
}
|
||||||
|
|
||||||
|
return cosmoSubgraphs
|
||||||
|
}
|
||||||
@@ -0,0 +1,258 @@
|
|||||||
|
package graph
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
|
"gitlab.com/unboundsoftware/schemas/graph/model"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestGenerateCosmoRouterConfig(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
subGraphs []*model.SubGraph
|
||||||
|
wantErr bool
|
||||||
|
validate func(t *testing.T, config string)
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "single subgraph with all fields",
|
||||||
|
subGraphs: []*model.SubGraph{
|
||||||
|
{
|
||||||
|
Service: "test-service",
|
||||||
|
URL: stringPtr("http://localhost:4001/query"),
|
||||||
|
WsURL: stringPtr("ws://localhost:4001/query"),
|
||||||
|
Sdl: "type Query { test: String }",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
validate: func(t *testing.T, config string) {
|
||||||
|
var result map[string]interface{}
|
||||||
|
err := json.Unmarshal([]byte(config), &result)
|
||||||
|
require.NoError(t, err, "Config should be valid JSON")
|
||||||
|
|
||||||
|
assert.Equal(t, "1", result["version"], "Version should be 1")
|
||||||
|
|
||||||
|
subgraphs, ok := result["subgraphs"].([]interface{})
|
||||||
|
require.True(t, ok, "subgraphs should be an array")
|
||||||
|
require.Len(t, subgraphs, 1, "Should have 1 subgraph")
|
||||||
|
|
||||||
|
sg := subgraphs[0].(map[string]interface{})
|
||||||
|
assert.Equal(t, "test-service", sg["name"])
|
||||||
|
assert.Equal(t, "http://localhost:4001/query", sg["routing_url"])
|
||||||
|
assert.Equal(t, "type Query { test: String }", sg["sdl"])
|
||||||
|
|
||||||
|
subscription, ok := sg["subscription"].(map[string]interface{})
|
||||||
|
require.True(t, ok, "Should have subscription config")
|
||||||
|
assert.Equal(t, "ws://localhost:4001/query", subscription["url"])
|
||||||
|
assert.Equal(t, "ws", subscription["protocol"])
|
||||||
|
assert.Equal(t, "graphql-ws", subscription["websocket_subprotocol"])
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "multiple subgraphs",
|
||||||
|
subGraphs: []*model.SubGraph{
|
||||||
|
{
|
||||||
|
Service: "service-1",
|
||||||
|
URL: stringPtr("http://localhost:4001/query"),
|
||||||
|
Sdl: "type Query { field1: String }",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Service: "service-2",
|
||||||
|
URL: stringPtr("http://localhost:4002/query"),
|
||||||
|
Sdl: "type Query { field2: String }",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Service: "service-3",
|
||||||
|
URL: stringPtr("http://localhost:4003/query"),
|
||||||
|
WsURL: stringPtr("ws://localhost:4003/query"),
|
||||||
|
Sdl: "type Subscription { updates: String }",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
validate: func(t *testing.T, config string) {
|
||||||
|
var result map[string]interface{}
|
||||||
|
err := json.Unmarshal([]byte(config), &result)
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
subgraphs := result["subgraphs"].([]interface{})
|
||||||
|
assert.Len(t, subgraphs, 3, "Should have 3 subgraphs")
|
||||||
|
|
||||||
|
// Check first service has no subscription
|
||||||
|
sg1 := subgraphs[0].(map[string]interface{})
|
||||||
|
assert.Equal(t, "service-1", sg1["name"])
|
||||||
|
_, hasSubscription := sg1["subscription"]
|
||||||
|
assert.False(t, hasSubscription, "service-1 should not have subscription config")
|
||||||
|
|
||||||
|
// Check third service has subscription
|
||||||
|
sg3 := subgraphs[2].(map[string]interface{})
|
||||||
|
assert.Equal(t, "service-3", sg3["name"])
|
||||||
|
subscription, hasSubscription := sg3["subscription"]
|
||||||
|
assert.True(t, hasSubscription, "service-3 should have subscription config")
|
||||||
|
assert.NotNil(t, subscription)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "subgraph with no URL",
|
||||||
|
subGraphs: []*model.SubGraph{
|
||||||
|
{
|
||||||
|
Service: "test-service",
|
||||||
|
URL: nil,
|
||||||
|
WsURL: nil,
|
||||||
|
Sdl: "type Query { test: String }",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
validate: func(t *testing.T, config string) {
|
||||||
|
var result map[string]interface{}
|
||||||
|
err := json.Unmarshal([]byte(config), &result)
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
subgraphs := result["subgraphs"].([]interface{})
|
||||||
|
sg := subgraphs[0].(map[string]interface{})
|
||||||
|
|
||||||
|
// Should not have routing_url or subscription fields if URLs are nil
|
||||||
|
_, hasRoutingURL := sg["routing_url"]
|
||||||
|
assert.False(t, hasRoutingURL, "Should not have routing_url when URL is nil")
|
||||||
|
|
||||||
|
_, hasSubscription := sg["subscription"]
|
||||||
|
assert.False(t, hasSubscription, "Should not have subscription when WsURL is nil")
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "empty subgraphs",
|
||||||
|
subGraphs: []*model.SubGraph{},
|
||||||
|
wantErr: false,
|
||||||
|
validate: func(t *testing.T, config string) {
|
||||||
|
var result map[string]interface{}
|
||||||
|
err := json.Unmarshal([]byte(config), &result)
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
subgraphs := result["subgraphs"].([]interface{})
|
||||||
|
assert.Len(t, subgraphs, 0, "Should have empty subgraphs array")
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "nil subgraphs",
|
||||||
|
subGraphs: nil,
|
||||||
|
wantErr: false,
|
||||||
|
validate: func(t *testing.T, config string) {
|
||||||
|
var result map[string]interface{}
|
||||||
|
err := json.Unmarshal([]byte(config), &result)
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
subgraphs := result["subgraphs"].([]interface{})
|
||||||
|
assert.Len(t, subgraphs, 0, "Should handle nil subgraphs as empty array")
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "complex SDL with multiple types",
|
||||||
|
subGraphs: []*model.SubGraph{
|
||||||
|
{
|
||||||
|
Service: "complex-service",
|
||||||
|
URL: stringPtr("http://localhost:4001/query"),
|
||||||
|
Sdl: `
|
||||||
|
type Query {
|
||||||
|
user(id: ID!): User
|
||||||
|
users: [User!]!
|
||||||
|
}
|
||||||
|
|
||||||
|
type User {
|
||||||
|
id: ID!
|
||||||
|
name: String!
|
||||||
|
email: String!
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
validate: func(t *testing.T, config string) {
|
||||||
|
var result map[string]interface{}
|
||||||
|
err := json.Unmarshal([]byte(config), &result)
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
subgraphs := result["subgraphs"].([]interface{})
|
||||||
|
sg := subgraphs[0].(map[string]interface{})
|
||||||
|
sdl := sg["sdl"].(string)
|
||||||
|
|
||||||
|
assert.Contains(t, sdl, "type Query")
|
||||||
|
assert.Contains(t, sdl, "type User")
|
||||||
|
assert.Contains(t, sdl, "email: String!")
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tt := range tests {
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
config, err := GenerateCosmoRouterConfig(tt.subGraphs)
|
||||||
|
|
||||||
|
if tt.wantErr {
|
||||||
|
assert.Error(t, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
require.NoError(t, err)
|
||||||
|
assert.NotEmpty(t, config, "Config should not be empty")
|
||||||
|
|
||||||
|
if tt.validate != nil {
|
||||||
|
tt.validate(t, config)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestConvertSubGraphsToCosmo(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
subGraphs []*model.SubGraph
|
||||||
|
wantLen int
|
||||||
|
validate func(t *testing.T, result []map[string]interface{})
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "preserves subgraph order",
|
||||||
|
subGraphs: []*model.SubGraph{
|
||||||
|
{Service: "alpha", URL: stringPtr("http://a"), Sdl: "a"},
|
||||||
|
{Service: "beta", URL: stringPtr("http://b"), Sdl: "b"},
|
||||||
|
{Service: "gamma", URL: stringPtr("http://c"), Sdl: "c"},
|
||||||
|
},
|
||||||
|
wantLen: 3,
|
||||||
|
validate: func(t *testing.T, result []map[string]interface{}) {
|
||||||
|
assert.Equal(t, "alpha", result[0]["name"])
|
||||||
|
assert.Equal(t, "beta", result[1]["name"])
|
||||||
|
assert.Equal(t, "gamma", result[2]["name"])
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "includes SDL exactly as provided",
|
||||||
|
subGraphs: []*model.SubGraph{
|
||||||
|
{
|
||||||
|
Service: "test",
|
||||||
|
URL: stringPtr("http://test"),
|
||||||
|
Sdl: "type Query { special: String! }",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
wantLen: 1,
|
||||||
|
validate: func(t *testing.T, result []map[string]interface{}) {
|
||||||
|
assert.Equal(t, "type Query { special: String! }", result[0]["sdl"])
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tt := range tests {
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
result := convertSubGraphsToCosmo(tt.subGraphs)
|
||||||
|
assert.Len(t, result, tt.wantLen)
|
||||||
|
|
||||||
|
if tt.validate != nil {
|
||||||
|
tt.validate(t, result)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Helper function for tests
|
||||||
|
func stringPtr(s string) *string {
|
||||||
|
return &s
|
||||||
|
}
|
||||||
@@ -42,6 +42,7 @@ type Config struct {
|
|||||||
type ResolverRoot interface {
|
type ResolverRoot interface {
|
||||||
Mutation() MutationResolver
|
Mutation() MutationResolver
|
||||||
Query() QueryResolver
|
Query() QueryResolver
|
||||||
|
Subscription() SubscriptionResolver
|
||||||
}
|
}
|
||||||
|
|
||||||
type DirectiveRoot struct {
|
type DirectiveRoot struct {
|
||||||
@@ -77,6 +78,13 @@ type ComplexityRoot struct {
|
|||||||
Supergraph func(childComplexity int, ref string, isAfter *string) int
|
Supergraph func(childComplexity int, ref string, isAfter *string) int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SchemaUpdate struct {
|
||||||
|
CosmoRouterConfig func(childComplexity int) int
|
||||||
|
ID func(childComplexity int) int
|
||||||
|
Ref func(childComplexity int) int
|
||||||
|
SubGraphs func(childComplexity int) int
|
||||||
|
}
|
||||||
|
|
||||||
SubGraph struct {
|
SubGraph struct {
|
||||||
ChangedAt func(childComplexity int) int
|
ChangedAt func(childComplexity int) int
|
||||||
ChangedBy func(childComplexity int) int
|
ChangedBy func(childComplexity int) int
|
||||||
@@ -94,6 +102,10 @@ type ComplexityRoot struct {
|
|||||||
SubGraphs func(childComplexity int) int
|
SubGraphs func(childComplexity int) int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Subscription struct {
|
||||||
|
SchemaUpdates func(childComplexity int, ref string) int
|
||||||
|
}
|
||||||
|
|
||||||
Unchanged struct {
|
Unchanged struct {
|
||||||
ID func(childComplexity int) int
|
ID func(childComplexity int) int
|
||||||
MinDelaySeconds func(childComplexity int) int
|
MinDelaySeconds func(childComplexity int) int
|
||||||
@@ -113,6 +125,9 @@ type QueryResolver interface {
|
|||||||
Organizations(ctx context.Context) ([]*model.Organization, error)
|
Organizations(ctx context.Context) ([]*model.Organization, error)
|
||||||
Supergraph(ctx context.Context, ref string, isAfter *string) (model.Supergraph, error)
|
Supergraph(ctx context.Context, ref string, isAfter *string) (model.Supergraph, error)
|
||||||
}
|
}
|
||||||
|
type SubscriptionResolver interface {
|
||||||
|
SchemaUpdates(ctx context.Context, ref string) (<-chan *model.SchemaUpdate, error)
|
||||||
|
}
|
||||||
|
|
||||||
type executableSchema struct {
|
type executableSchema struct {
|
||||||
schema *ast.Schema
|
schema *ast.Schema
|
||||||
@@ -253,6 +268,31 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin
|
|||||||
|
|
||||||
return e.complexity.Query.Supergraph(childComplexity, args["ref"].(string), args["isAfter"].(*string)), true
|
return e.complexity.Query.Supergraph(childComplexity, args["ref"].(string), args["isAfter"].(*string)), true
|
||||||
|
|
||||||
|
case "SchemaUpdate.cosmoRouterConfig":
|
||||||
|
if e.complexity.SchemaUpdate.CosmoRouterConfig == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.SchemaUpdate.CosmoRouterConfig(childComplexity), true
|
||||||
|
case "SchemaUpdate.id":
|
||||||
|
if e.complexity.SchemaUpdate.ID == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.SchemaUpdate.ID(childComplexity), true
|
||||||
|
case "SchemaUpdate.ref":
|
||||||
|
if e.complexity.SchemaUpdate.Ref == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.SchemaUpdate.Ref(childComplexity), true
|
||||||
|
case "SchemaUpdate.subGraphs":
|
||||||
|
if e.complexity.SchemaUpdate.SubGraphs == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.SchemaUpdate.SubGraphs(childComplexity), true
|
||||||
|
|
||||||
case "SubGraph.changedAt":
|
case "SubGraph.changedAt":
|
||||||
if e.complexity.SubGraph.ChangedAt == nil {
|
if e.complexity.SubGraph.ChangedAt == nil {
|
||||||
break
|
break
|
||||||
@@ -321,6 +361,18 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin
|
|||||||
|
|
||||||
return e.complexity.SubGraphs.SubGraphs(childComplexity), true
|
return e.complexity.SubGraphs.SubGraphs(childComplexity), true
|
||||||
|
|
||||||
|
case "Subscription.schemaUpdates":
|
||||||
|
if e.complexity.Subscription.SchemaUpdates == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
args, err := ec.field_Subscription_schemaUpdates_args(ctx, rawArgs)
|
||||||
|
if err != nil {
|
||||||
|
return 0, false
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.Subscription.SchemaUpdates(childComplexity, args["ref"].(string)), true
|
||||||
|
|
||||||
case "Unchanged.id":
|
case "Unchanged.id":
|
||||||
if e.complexity.Unchanged.ID == nil {
|
if e.complexity.Unchanged.ID == nil {
|
||||||
break
|
break
|
||||||
@@ -396,6 +448,23 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
|
|||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
data.MarshalGQL(&buf)
|
data.MarshalGQL(&buf)
|
||||||
|
|
||||||
|
return &graphql.Response{
|
||||||
|
Data: buf.Bytes(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case ast.Subscription:
|
||||||
|
next := ec._Subscription(ctx, opCtx.Operation.SelectionSet)
|
||||||
|
|
||||||
|
var buf bytes.Buffer
|
||||||
|
return func(ctx context.Context) *graphql.Response {
|
||||||
|
buf.Reset()
|
||||||
|
data := next(ctx)
|
||||||
|
|
||||||
|
if data == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
data.MarshalGQL(&buf)
|
||||||
|
|
||||||
return &graphql.Response{
|
return &graphql.Response{
|
||||||
Data: buf.Bytes(),
|
Data: buf.Bytes(),
|
||||||
}
|
}
|
||||||
@@ -459,6 +528,10 @@ type Mutation {
|
|||||||
updateSubGraph(input: InputSubGraph!): SubGraph! @auth(organization: true)
|
updateSubGraph(input: InputSubGraph!): SubGraph! @auth(organization: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Subscription {
|
||||||
|
schemaUpdates(ref: String!): SchemaUpdate! @auth(organization: true)
|
||||||
|
}
|
||||||
|
|
||||||
type Organization {
|
type Organization {
|
||||||
id: ID!
|
id: ID!
|
||||||
name: String!
|
name: String!
|
||||||
@@ -504,6 +577,13 @@ type SubGraph {
|
|||||||
changedAt: Time!
|
changedAt: Time!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SchemaUpdate {
|
||||||
|
ref: String!
|
||||||
|
id: ID!
|
||||||
|
subGraphs: [SubGraph!]!
|
||||||
|
cosmoRouterConfig: String
|
||||||
|
}
|
||||||
|
|
||||||
input InputAPIKey {
|
input InputAPIKey {
|
||||||
name: String!
|
name: String!
|
||||||
organizationId: ID!
|
organizationId: ID!
|
||||||
@@ -607,6 +687,17 @@ func (ec *executionContext) field_Query_supergraph_args(ctx context.Context, raw
|
|||||||
return args, nil
|
return args, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) field_Subscription_schemaUpdates_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
|
||||||
|
var err error
|
||||||
|
args := map[string]any{}
|
||||||
|
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "ref", ec.unmarshalNString2string)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
args["ref"] = arg0
|
||||||
|
return args, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) field___Directive_args_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
|
func (ec *executionContext) field___Directive_args_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
|
||||||
var err error
|
var err error
|
||||||
args := map[string]any{}
|
args := map[string]any{}
|
||||||
@@ -1451,6 +1542,138 @@ func (ec *executionContext) fieldContext_Query___schema(_ context.Context, field
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _SchemaUpdate_ref(ctx context.Context, field graphql.CollectedField, obj *model.SchemaUpdate) (ret graphql.Marshaler) {
|
||||||
|
return graphql.ResolveField(
|
||||||
|
ctx,
|
||||||
|
ec.OperationContext,
|
||||||
|
field,
|
||||||
|
ec.fieldContext_SchemaUpdate_ref,
|
||||||
|
func(ctx context.Context) (any, error) {
|
||||||
|
return obj.Ref, nil
|
||||||
|
},
|
||||||
|
nil,
|
||||||
|
ec.marshalNString2string,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_SchemaUpdate_ref(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "SchemaUpdate",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: false,
|
||||||
|
IsResolver: false,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
return nil, errors.New("field of type String does not have child fields")
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _SchemaUpdate_id(ctx context.Context, field graphql.CollectedField, obj *model.SchemaUpdate) (ret graphql.Marshaler) {
|
||||||
|
return graphql.ResolveField(
|
||||||
|
ctx,
|
||||||
|
ec.OperationContext,
|
||||||
|
field,
|
||||||
|
ec.fieldContext_SchemaUpdate_id,
|
||||||
|
func(ctx context.Context) (any, error) {
|
||||||
|
return obj.ID, nil
|
||||||
|
},
|
||||||
|
nil,
|
||||||
|
ec.marshalNID2string,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_SchemaUpdate_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "SchemaUpdate",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: false,
|
||||||
|
IsResolver: false,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
return nil, errors.New("field of type ID does not have child fields")
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _SchemaUpdate_subGraphs(ctx context.Context, field graphql.CollectedField, obj *model.SchemaUpdate) (ret graphql.Marshaler) {
|
||||||
|
return graphql.ResolveField(
|
||||||
|
ctx,
|
||||||
|
ec.OperationContext,
|
||||||
|
field,
|
||||||
|
ec.fieldContext_SchemaUpdate_subGraphs,
|
||||||
|
func(ctx context.Context) (any, error) {
|
||||||
|
return obj.SubGraphs, nil
|
||||||
|
},
|
||||||
|
nil,
|
||||||
|
ec.marshalNSubGraph2ᚕᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraphᚄ,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_SchemaUpdate_subGraphs(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "SchemaUpdate",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: false,
|
||||||
|
IsResolver: false,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
switch field.Name {
|
||||||
|
case "id":
|
||||||
|
return ec.fieldContext_SubGraph_id(ctx, field)
|
||||||
|
case "service":
|
||||||
|
return ec.fieldContext_SubGraph_service(ctx, field)
|
||||||
|
case "url":
|
||||||
|
return ec.fieldContext_SubGraph_url(ctx, field)
|
||||||
|
case "wsUrl":
|
||||||
|
return ec.fieldContext_SubGraph_wsUrl(ctx, field)
|
||||||
|
case "sdl":
|
||||||
|
return ec.fieldContext_SubGraph_sdl(ctx, field)
|
||||||
|
case "changedBy":
|
||||||
|
return ec.fieldContext_SubGraph_changedBy(ctx, field)
|
||||||
|
case "changedAt":
|
||||||
|
return ec.fieldContext_SubGraph_changedAt(ctx, field)
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("no field named %q was found under type SubGraph", field.Name)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _SchemaUpdate_cosmoRouterConfig(ctx context.Context, field graphql.CollectedField, obj *model.SchemaUpdate) (ret graphql.Marshaler) {
|
||||||
|
return graphql.ResolveField(
|
||||||
|
ctx,
|
||||||
|
ec.OperationContext,
|
||||||
|
field,
|
||||||
|
ec.fieldContext_SchemaUpdate_cosmoRouterConfig,
|
||||||
|
func(ctx context.Context) (any, error) {
|
||||||
|
return obj.CosmoRouterConfig, nil
|
||||||
|
},
|
||||||
|
nil,
|
||||||
|
ec.marshalOString2ᚖstring,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_SchemaUpdate_cosmoRouterConfig(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "SchemaUpdate",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: false,
|
||||||
|
IsResolver: false,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
return nil, errors.New("field of type String does not have child fields")
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _SubGraph_id(ctx context.Context, field graphql.CollectedField, obj *model.SubGraph) (ret graphql.Marshaler) {
|
func (ec *executionContext) _SubGraph_id(ctx context.Context, field graphql.CollectedField, obj *model.SubGraph) (ret graphql.Marshaler) {
|
||||||
return graphql.ResolveField(
|
return graphql.ResolveField(
|
||||||
ctx,
|
ctx,
|
||||||
@@ -1786,6 +2009,75 @@ func (ec *executionContext) fieldContext_SubGraphs_subGraphs(_ context.Context,
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Subscription_schemaUpdates(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) {
|
||||||
|
return graphql.ResolveFieldStream(
|
||||||
|
ctx,
|
||||||
|
ec.OperationContext,
|
||||||
|
field,
|
||||||
|
ec.fieldContext_Subscription_schemaUpdates,
|
||||||
|
func(ctx context.Context) (any, error) {
|
||||||
|
fc := graphql.GetFieldContext(ctx)
|
||||||
|
return ec.resolvers.Subscription().SchemaUpdates(ctx, fc.Args["ref"].(string))
|
||||||
|
},
|
||||||
|
func(ctx context.Context, next graphql.Resolver) graphql.Resolver {
|
||||||
|
directive0 := next
|
||||||
|
|
||||||
|
directive1 := func(ctx context.Context) (any, error) {
|
||||||
|
organization, err := ec.unmarshalOBoolean2ᚖbool(ctx, true)
|
||||||
|
if err != nil {
|
||||||
|
var zeroVal *model.SchemaUpdate
|
||||||
|
return zeroVal, err
|
||||||
|
}
|
||||||
|
if ec.directives.Auth == nil {
|
||||||
|
var zeroVal *model.SchemaUpdate
|
||||||
|
return zeroVal, errors.New("directive auth is not implemented")
|
||||||
|
}
|
||||||
|
return ec.directives.Auth(ctx, nil, directive0, nil, organization)
|
||||||
|
}
|
||||||
|
|
||||||
|
next = directive1
|
||||||
|
return next
|
||||||
|
},
|
||||||
|
ec.marshalNSchemaUpdate2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_Subscription_schemaUpdates(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "Subscription",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: true,
|
||||||
|
IsResolver: true,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
switch field.Name {
|
||||||
|
case "ref":
|
||||||
|
return ec.fieldContext_SchemaUpdate_ref(ctx, field)
|
||||||
|
case "id":
|
||||||
|
return ec.fieldContext_SchemaUpdate_id(ctx, field)
|
||||||
|
case "subGraphs":
|
||||||
|
return ec.fieldContext_SchemaUpdate_subGraphs(ctx, field)
|
||||||
|
case "cosmoRouterConfig":
|
||||||
|
return ec.fieldContext_SchemaUpdate_cosmoRouterConfig(ctx, field)
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("no field named %q was found under type SchemaUpdate", field.Name)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
err = ec.Recover(ctx, r)
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
if fc.Args, err = ec.field_Subscription_schemaUpdates_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return fc, err
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _Unchanged_id(ctx context.Context, field graphql.CollectedField, obj *model.Unchanged) (ret graphql.Marshaler) {
|
func (ec *executionContext) _Unchanged_id(ctx context.Context, field graphql.CollectedField, obj *model.Unchanged) (ret graphql.Marshaler) {
|
||||||
return graphql.ResolveField(
|
return graphql.ResolveField(
|
||||||
ctx,
|
ctx,
|
||||||
@@ -3737,6 +4029,57 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var schemaUpdateImplementors = []string{"SchemaUpdate"}
|
||||||
|
|
||||||
|
func (ec *executionContext) _SchemaUpdate(ctx context.Context, sel ast.SelectionSet, obj *model.SchemaUpdate) graphql.Marshaler {
|
||||||
|
fields := graphql.CollectFields(ec.OperationContext, sel, schemaUpdateImplementors)
|
||||||
|
|
||||||
|
out := graphql.NewFieldSet(fields)
|
||||||
|
deferred := make(map[string]*graphql.FieldSet)
|
||||||
|
for i, field := range fields {
|
||||||
|
switch field.Name {
|
||||||
|
case "__typename":
|
||||||
|
out.Values[i] = graphql.MarshalString("SchemaUpdate")
|
||||||
|
case "ref":
|
||||||
|
out.Values[i] = ec._SchemaUpdate_ref(ctx, field, obj)
|
||||||
|
if out.Values[i] == graphql.Null {
|
||||||
|
out.Invalids++
|
||||||
|
}
|
||||||
|
case "id":
|
||||||
|
out.Values[i] = ec._SchemaUpdate_id(ctx, field, obj)
|
||||||
|
if out.Values[i] == graphql.Null {
|
||||||
|
out.Invalids++
|
||||||
|
}
|
||||||
|
case "subGraphs":
|
||||||
|
out.Values[i] = ec._SchemaUpdate_subGraphs(ctx, field, obj)
|
||||||
|
if out.Values[i] == graphql.Null {
|
||||||
|
out.Invalids++
|
||||||
|
}
|
||||||
|
case "cosmoRouterConfig":
|
||||||
|
out.Values[i] = ec._SchemaUpdate_cosmoRouterConfig(ctx, field, obj)
|
||||||
|
default:
|
||||||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
out.Dispatch(ctx)
|
||||||
|
if out.Invalids > 0 {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
|
||||||
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
||||||
|
|
||||||
|
for label, dfs := range deferred {
|
||||||
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
||||||
|
Label: label,
|
||||||
|
Path: graphql.GetPath(ctx),
|
||||||
|
FieldSet: dfs,
|
||||||
|
Context: ctx,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
var subGraphImplementors = []string{"SubGraph"}
|
var subGraphImplementors = []string{"SubGraph"}
|
||||||
|
|
||||||
func (ec *executionContext) _SubGraph(ctx context.Context, sel ast.SelectionSet, obj *model.SubGraph) graphql.Marshaler {
|
func (ec *executionContext) _SubGraph(ctx context.Context, sel ast.SelectionSet, obj *model.SubGraph) graphql.Marshaler {
|
||||||
@@ -3854,6 +4197,26 @@ func (ec *executionContext) _SubGraphs(ctx context.Context, sel ast.SelectionSet
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var subscriptionImplementors = []string{"Subscription"}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func(ctx context.Context) graphql.Marshaler {
|
||||||
|
fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors)
|
||||||
|
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
|
||||||
|
Object: "Subscription",
|
||||||
|
})
|
||||||
|
if len(fields) != 1 {
|
||||||
|
ec.Errorf(ctx, "must subscribe to exactly one stream")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
switch fields[0].Name {
|
||||||
|
case "schemaUpdates":
|
||||||
|
return ec._Subscription_schemaUpdates(ctx, fields[0])
|
||||||
|
default:
|
||||||
|
panic("unknown field " + strconv.Quote(fields[0].Name))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var unchangedImplementors = []string{"Unchanged", "Supergraph"}
|
var unchangedImplementors = []string{"Unchanged", "Supergraph"}
|
||||||
|
|
||||||
func (ec *executionContext) _Unchanged(ctx context.Context, sel ast.SelectionSet, obj *model.Unchanged) graphql.Marshaler {
|
func (ec *executionContext) _Unchanged(ctx context.Context, sel ast.SelectionSet, obj *model.Unchanged) graphql.Marshaler {
|
||||||
@@ -4441,6 +4804,20 @@ func (ec *executionContext) marshalNOrganization2ᚖgitlabᚗcomᚋunboundsoftwa
|
|||||||
return ec._Organization(ctx, sel, v)
|
return ec._Organization(ctx, sel, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) marshalNSchemaUpdate2gitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate(ctx context.Context, sel ast.SelectionSet, v model.SchemaUpdate) graphql.Marshaler {
|
||||||
|
return ec._SchemaUpdate(ctx, sel, &v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) marshalNSchemaUpdate2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate(ctx context.Context, sel ast.SelectionSet, v *model.SchemaUpdate) graphql.Marshaler {
|
||||||
|
if v == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||||
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
return ec._SchemaUpdate(ctx, sel, v)
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) unmarshalNString2string(ctx context.Context, v any) (string, error) {
|
func (ec *executionContext) unmarshalNString2string(ctx context.Context, v any) (string, error) {
|
||||||
res, err := graphql.UnmarshalString(v)
|
res, err := graphql.UnmarshalString(v)
|
||||||
return res, graphql.ErrorOnPath(ctx, err)
|
return res, graphql.ErrorOnPath(ctx, err)
|
||||||
|
|||||||
@@ -49,6 +49,13 @@ type Organization struct {
|
|||||||
type Query struct {
|
type Query struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SchemaUpdate struct {
|
||||||
|
Ref string `json:"ref"`
|
||||||
|
ID string `json:"id"`
|
||||||
|
SubGraphs []*SubGraph `json:"subGraphs"`
|
||||||
|
CosmoRouterConfig *string `json:"cosmoRouterConfig,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
type SubGraph struct {
|
type SubGraph struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Service string `json:"service"`
|
Service string `json:"service"`
|
||||||
@@ -68,6 +75,9 @@ type SubGraphs struct {
|
|||||||
|
|
||||||
func (SubGraphs) IsSupergraph() {}
|
func (SubGraphs) IsSupergraph() {}
|
||||||
|
|
||||||
|
type Subscription struct {
|
||||||
|
}
|
||||||
|
|
||||||
type Unchanged struct {
|
type Unchanged struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
MinDelaySeconds int `json:"minDelaySeconds"`
|
MinDelaySeconds int `json:"minDelaySeconds"`
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package graph
|
||||||
|
|
||||||
|
import (
|
||||||
|
"sync"
|
||||||
|
|
||||||
|
"gitlab.com/unboundsoftware/schemas/graph/model"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PubSub handles publishing schema updates to subscribers
|
||||||
|
type PubSub struct {
|
||||||
|
mu sync.RWMutex
|
||||||
|
subscribers map[string][]chan *model.SchemaUpdate
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewPubSub() *PubSub {
|
||||||
|
return &PubSub{
|
||||||
|
subscribers: make(map[string][]chan *model.SchemaUpdate),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Subscribe creates a new subscription channel for a given schema ref
|
||||||
|
func (ps *PubSub) Subscribe(ref string) chan *model.SchemaUpdate {
|
||||||
|
ps.mu.Lock()
|
||||||
|
defer ps.mu.Unlock()
|
||||||
|
|
||||||
|
ch := make(chan *model.SchemaUpdate, 10)
|
||||||
|
ps.subscribers[ref] = append(ps.subscribers[ref], ch)
|
||||||
|
|
||||||
|
return ch
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unsubscribe removes a subscription channel
|
||||||
|
func (ps *PubSub) Unsubscribe(ref string, ch chan *model.SchemaUpdate) {
|
||||||
|
ps.mu.Lock()
|
||||||
|
defer ps.mu.Unlock()
|
||||||
|
|
||||||
|
subs := ps.subscribers[ref]
|
||||||
|
for i, sub := range subs {
|
||||||
|
if sub == ch {
|
||||||
|
// Remove this subscriber
|
||||||
|
ps.subscribers[ref] = append(subs[:i], subs[i+1:]...)
|
||||||
|
close(sub)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up empty subscriber lists
|
||||||
|
if len(ps.subscribers[ref]) == 0 {
|
||||||
|
delete(ps.subscribers, ref)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Publish sends a schema update to all subscribers of a given ref
|
||||||
|
func (ps *PubSub) Publish(ref string, update *model.SchemaUpdate) {
|
||||||
|
ps.mu.RLock()
|
||||||
|
defer ps.mu.RUnlock()
|
||||||
|
|
||||||
|
for _, ch := range ps.subscribers[ref] {
|
||||||
|
// Non-blocking send - if subscriber is slow, skip
|
||||||
|
select {
|
||||||
|
case ch <- update:
|
||||||
|
default:
|
||||||
|
// Channel full, subscriber is too slow - skip this update
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,256 @@
|
|||||||
|
package graph
|
||||||
|
|
||||||
|
import (
|
||||||
|
"sync"
|
||||||
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
|
"gitlab.com/unboundsoftware/schemas/graph/model"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestPubSub_SubscribeAndPublish(t *testing.T) {
|
||||||
|
ps := NewPubSub()
|
||||||
|
ref := "Test@dev"
|
||||||
|
|
||||||
|
// Subscribe
|
||||||
|
ch := ps.Subscribe(ref)
|
||||||
|
require.NotNil(t, ch, "Subscribe should return a channel")
|
||||||
|
|
||||||
|
// Publish
|
||||||
|
update := &model.SchemaUpdate{
|
||||||
|
Ref: ref,
|
||||||
|
ID: "test-id-1",
|
||||||
|
SubGraphs: []*model.SubGraph{
|
||||||
|
{
|
||||||
|
ID: "sg1",
|
||||||
|
Service: "test-service",
|
||||||
|
Sdl: "type Query { test: String }",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
go ps.Publish(ref, update)
|
||||||
|
|
||||||
|
// Receive
|
||||||
|
select {
|
||||||
|
case received := <-ch:
|
||||||
|
assert.Equal(t, update.Ref, received.Ref, "Ref should match")
|
||||||
|
assert.Equal(t, update.ID, received.ID, "ID should match")
|
||||||
|
assert.Equal(t, len(update.SubGraphs), len(received.SubGraphs), "SubGraphs count should match")
|
||||||
|
case <-time.After(1 * time.Second):
|
||||||
|
t.Fatal("Timeout waiting for published update")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPubSub_MultipleSubscribers(t *testing.T) {
|
||||||
|
ps := NewPubSub()
|
||||||
|
ref := "Test@dev"
|
||||||
|
|
||||||
|
// Create multiple subscribers
|
||||||
|
ch1 := ps.Subscribe(ref)
|
||||||
|
ch2 := ps.Subscribe(ref)
|
||||||
|
ch3 := ps.Subscribe(ref)
|
||||||
|
|
||||||
|
update := &model.SchemaUpdate{
|
||||||
|
Ref: ref,
|
||||||
|
ID: "test-id-2",
|
||||||
|
}
|
||||||
|
|
||||||
|
// Publish once
|
||||||
|
ps.Publish(ref, update)
|
||||||
|
|
||||||
|
// All subscribers should receive the update
|
||||||
|
var wg sync.WaitGroup
|
||||||
|
wg.Add(3)
|
||||||
|
|
||||||
|
checkReceived := func(ch <-chan *model.SchemaUpdate, name string) {
|
||||||
|
defer wg.Done()
|
||||||
|
select {
|
||||||
|
case received := <-ch:
|
||||||
|
assert.Equal(t, update.ID, received.ID, "%s should receive correct update", name)
|
||||||
|
case <-time.After(1 * time.Second):
|
||||||
|
t.Errorf("%s: Timeout waiting for update", name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
go checkReceived(ch1, "Subscriber 1")
|
||||||
|
go checkReceived(ch2, "Subscriber 2")
|
||||||
|
go checkReceived(ch3, "Subscriber 3")
|
||||||
|
|
||||||
|
wg.Wait()
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPubSub_DifferentRefs(t *testing.T) {
|
||||||
|
ps := NewPubSub()
|
||||||
|
|
||||||
|
ref1 := "Test1@dev"
|
||||||
|
ref2 := "Test2@dev"
|
||||||
|
|
||||||
|
ch1 := ps.Subscribe(ref1)
|
||||||
|
ch2 := ps.Subscribe(ref2)
|
||||||
|
|
||||||
|
update1 := &model.SchemaUpdate{Ref: ref1, ID: "id1"}
|
||||||
|
update2 := &model.SchemaUpdate{Ref: ref2, ID: "id2"}
|
||||||
|
|
||||||
|
// Publish to ref1
|
||||||
|
ps.Publish(ref1, update1)
|
||||||
|
|
||||||
|
// Only ch1 should receive
|
||||||
|
select {
|
||||||
|
case received := <-ch1:
|
||||||
|
assert.Equal(t, "id1", received.ID)
|
||||||
|
case <-time.After(100 * time.Millisecond):
|
||||||
|
t.Fatal("ch1 should have received update")
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch2 should not receive ref1's update
|
||||||
|
select {
|
||||||
|
case <-ch2:
|
||||||
|
t.Fatal("ch2 should not receive ref1's update")
|
||||||
|
case <-time.After(100 * time.Millisecond):
|
||||||
|
// Expected - no update
|
||||||
|
}
|
||||||
|
|
||||||
|
// Publish to ref2
|
||||||
|
ps.Publish(ref2, update2)
|
||||||
|
|
||||||
|
// Now ch2 should receive
|
||||||
|
select {
|
||||||
|
case received := <-ch2:
|
||||||
|
assert.Equal(t, "id2", received.ID)
|
||||||
|
case <-time.After(100 * time.Millisecond):
|
||||||
|
t.Fatal("ch2 should have received update")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPubSub_Unsubscribe(t *testing.T) {
|
||||||
|
ps := NewPubSub()
|
||||||
|
ref := "Test@dev"
|
||||||
|
|
||||||
|
ch := ps.Subscribe(ref)
|
||||||
|
|
||||||
|
// Unsubscribe
|
||||||
|
ps.Unsubscribe(ref, ch)
|
||||||
|
|
||||||
|
// Channel should be closed
|
||||||
|
_, ok := <-ch
|
||||||
|
assert.False(t, ok, "Channel should be closed after unsubscribe")
|
||||||
|
|
||||||
|
// Publishing after unsubscribe should not panic
|
||||||
|
assert.NotPanics(t, func() {
|
||||||
|
ps.Publish(ref, &model.SchemaUpdate{Ref: ref})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPubSub_BufferedChannel(t *testing.T) {
|
||||||
|
ps := NewPubSub()
|
||||||
|
ref := "Test@dev"
|
||||||
|
|
||||||
|
ch := ps.Subscribe(ref)
|
||||||
|
|
||||||
|
// Publish multiple updates quickly (up to buffer size of 10)
|
||||||
|
for i := 0; i < 10; i++ {
|
||||||
|
update := &model.SchemaUpdate{
|
||||||
|
Ref: ref,
|
||||||
|
ID: string(rune('a' + i)),
|
||||||
|
}
|
||||||
|
ps.Publish(ref, update)
|
||||||
|
}
|
||||||
|
|
||||||
|
// All 10 should be buffered and receivable
|
||||||
|
received := 0
|
||||||
|
timeout := time.After(1 * time.Second)
|
||||||
|
|
||||||
|
for received < 10 {
|
||||||
|
select {
|
||||||
|
case <-ch:
|
||||||
|
received++
|
||||||
|
case <-timeout:
|
||||||
|
t.Fatalf("Only received %d out of 10 updates", received)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.Equal(t, 10, received, "Should receive all buffered updates")
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPubSub_SlowSubscriber(t *testing.T) {
|
||||||
|
ps := NewPubSub()
|
||||||
|
ref := "Test@dev"
|
||||||
|
|
||||||
|
ch := ps.Subscribe(ref)
|
||||||
|
|
||||||
|
// Fill the buffer (10 items)
|
||||||
|
for i := 0; i < 10; i++ {
|
||||||
|
ps.Publish(ref, &model.SchemaUpdate{Ref: ref})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Publish one more - this should be dropped (channel full, non-blocking send)
|
||||||
|
ps.Publish(ref, &model.SchemaUpdate{Ref: ref, ID: "should-be-dropped"})
|
||||||
|
|
||||||
|
// Drain the channel
|
||||||
|
count := 0
|
||||||
|
timeout := time.After(500 * time.Millisecond)
|
||||||
|
|
||||||
|
drainLoop:
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case update := <-ch:
|
||||||
|
count++
|
||||||
|
// Should not receive the dropped update
|
||||||
|
assert.NotEqual(t, "should-be-dropped", update.ID, "Should not receive dropped update")
|
||||||
|
case <-timeout:
|
||||||
|
break drainLoop
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Should have received exactly 10 (the buffer size), not 11
|
||||||
|
assert.Equal(t, 10, count, "Should only receive buffered updates, not the dropped one")
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPubSub_ConcurrentPublish(t *testing.T) {
|
||||||
|
ps := NewPubSub()
|
||||||
|
ref := "Test@dev"
|
||||||
|
|
||||||
|
ch := ps.Subscribe(ref)
|
||||||
|
|
||||||
|
numPublishers := 10
|
||||||
|
updatesPerPublisher := 10
|
||||||
|
|
||||||
|
var wg sync.WaitGroup
|
||||||
|
wg.Add(numPublishers)
|
||||||
|
|
||||||
|
// Multiple goroutines publishing concurrently
|
||||||
|
for i := 0; i < numPublishers; i++ {
|
||||||
|
go func(publisherID int) {
|
||||||
|
defer wg.Done()
|
||||||
|
for j := 0; j < updatesPerPublisher; j++ {
|
||||||
|
ps.Publish(ref, &model.SchemaUpdate{
|
||||||
|
Ref: ref,
|
||||||
|
ID: string(rune('a' + publisherID)),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}(i)
|
||||||
|
}
|
||||||
|
|
||||||
|
wg.Wait()
|
||||||
|
|
||||||
|
// Should not panic and subscriber should receive updates
|
||||||
|
// (exact count may vary due to buffer and timing)
|
||||||
|
timeout := time.After(1 * time.Second)
|
||||||
|
received := 0
|
||||||
|
|
||||||
|
receiveLoop:
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case <-ch:
|
||||||
|
received++
|
||||||
|
case <-timeout:
|
||||||
|
break receiveLoop
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.Greater(t, received, 0, "Should have received some updates")
|
||||||
|
}
|
||||||
@@ -28,6 +28,7 @@ type Resolver struct {
|
|||||||
Publisher Publisher
|
Publisher Publisher
|
||||||
Logger *slog.Logger
|
Logger *slog.Logger
|
||||||
Cache *cache.Cache
|
Cache *cache.Cache
|
||||||
|
PubSub *PubSub
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Resolver) apiKeyCanAccessRef(ctx context.Context, ref string, publish bool) (string, error) {
|
func (r *Resolver) apiKeyCanAccessRef(ctx context.Context, ref string, publish bool) (string, error) {
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ type Mutation {
|
|||||||
updateSubGraph(input: InputSubGraph!): SubGraph! @auth(organization: true)
|
updateSubGraph(input: InputSubGraph!): SubGraph! @auth(organization: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Subscription {
|
||||||
|
schemaUpdates(ref: String!): SchemaUpdate! @auth(organization: true)
|
||||||
|
}
|
||||||
|
|
||||||
type Organization {
|
type Organization {
|
||||||
id: ID!
|
id: ID!
|
||||||
name: String!
|
name: String!
|
||||||
@@ -54,6 +58,13 @@ type SubGraph {
|
|||||||
changedAt: Time!
|
changedAt: Time!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SchemaUpdate {
|
||||||
|
ref: String!
|
||||||
|
id: ID!
|
||||||
|
subGraphs: [SubGraph!]!
|
||||||
|
cosmoRouterConfig: String
|
||||||
|
}
|
||||||
|
|
||||||
input InputAPIKey {
|
input InputAPIKey {
|
||||||
name: String!
|
name: String!
|
||||||
organizationId: ID!
|
organizationId: ID!
|
||||||
|
|||||||
+101
-2
@@ -119,6 +119,44 @@ func (r *mutationResolver) UpdateSubGraph(ctx context.Context, input model.Input
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Publish schema update to subscribers
|
||||||
|
go func() {
|
||||||
|
services, lastUpdate := r.Cache.Services(orgId, input.Ref, "")
|
||||||
|
subGraphs := make([]*model.SubGraph, len(services))
|
||||||
|
for i, id := range services {
|
||||||
|
sg, err := r.fetchSubGraph(context.Background(), id)
|
||||||
|
if err != nil {
|
||||||
|
r.Logger.Error("fetch subgraph for update notification", "error", err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
subGraphs[i] = &model.SubGraph{
|
||||||
|
ID: sg.ID.String(),
|
||||||
|
Service: sg.Service,
|
||||||
|
URL: sg.Url,
|
||||||
|
WsURL: sg.WSUrl,
|
||||||
|
Sdl: sg.Sdl,
|
||||||
|
ChangedBy: sg.ChangedBy,
|
||||||
|
ChangedAt: sg.ChangedAt,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Generate Cosmo router config
|
||||||
|
cosmoConfig, err := GenerateCosmoRouterConfig(subGraphs)
|
||||||
|
if err != nil {
|
||||||
|
r.Logger.Error("generate cosmo config for update", "error", err)
|
||||||
|
cosmoConfig = "" // Send empty if generation fails
|
||||||
|
}
|
||||||
|
|
||||||
|
// Publish to all subscribers of this ref
|
||||||
|
r.PubSub.Publish(input.Ref, &model.SchemaUpdate{
|
||||||
|
Ref: input.Ref,
|
||||||
|
ID: lastUpdate,
|
||||||
|
SubGraphs: subGraphs,
|
||||||
|
CosmoRouterConfig: &cosmoConfig,
|
||||||
|
})
|
||||||
|
}()
|
||||||
|
|
||||||
return r.toGqlSubGraph(subGraph), nil
|
return r.toGqlSubGraph(subGraph), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,13 +222,74 @@ func (r *queryResolver) Supergraph(ctx context.Context, ref string, isAfter *str
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SchemaUpdates is the resolver for the schemaUpdates field.
|
||||||
|
func (r *subscriptionResolver) SchemaUpdates(ctx context.Context, ref string) (<-chan *model.SchemaUpdate, error) {
|
||||||
|
orgId := middleware.OrganizationFromContext(ctx)
|
||||||
|
_, err := r.apiKeyCanAccessRef(ctx, ref, false)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Subscribe to updates for this ref
|
||||||
|
ch := r.PubSub.Subscribe(ref)
|
||||||
|
|
||||||
|
// Send initial state immediately
|
||||||
|
go func() {
|
||||||
|
services, lastUpdate := r.Cache.Services(orgId, ref, "")
|
||||||
|
subGraphs := make([]*model.SubGraph, len(services))
|
||||||
|
for i, id := range services {
|
||||||
|
sg, err := r.fetchSubGraph(ctx, id)
|
||||||
|
if err != nil {
|
||||||
|
r.Logger.Error("fetch subgraph for initial update", "error", err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
subGraphs[i] = &model.SubGraph{
|
||||||
|
ID: sg.ID.String(),
|
||||||
|
Service: sg.Service,
|
||||||
|
URL: sg.Url,
|
||||||
|
WsURL: sg.WSUrl,
|
||||||
|
Sdl: sg.Sdl,
|
||||||
|
ChangedBy: sg.ChangedBy,
|
||||||
|
ChangedAt: sg.ChangedAt,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Generate Cosmo router config
|
||||||
|
cosmoConfig, err := GenerateCosmoRouterConfig(subGraphs)
|
||||||
|
if err != nil {
|
||||||
|
r.Logger.Error("generate cosmo config", "error", err)
|
||||||
|
cosmoConfig = "" // Send empty if generation fails
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send initial update
|
||||||
|
ch <- &model.SchemaUpdate{
|
||||||
|
Ref: ref,
|
||||||
|
ID: lastUpdate,
|
||||||
|
SubGraphs: subGraphs,
|
||||||
|
CosmoRouterConfig: &cosmoConfig,
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
// Clean up subscription when context is done
|
||||||
|
go func() {
|
||||||
|
<-ctx.Done()
|
||||||
|
r.PubSub.Unsubscribe(ref, ch)
|
||||||
|
}()
|
||||||
|
|
||||||
|
return ch, nil
|
||||||
|
}
|
||||||
|
|
||||||
// Mutation returns generated.MutationResolver implementation.
|
// Mutation returns generated.MutationResolver implementation.
|
||||||
func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResolver{r} }
|
func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResolver{r} }
|
||||||
|
|
||||||
// Query returns generated.QueryResolver implementation.
|
// Query returns generated.QueryResolver implementation.
|
||||||
func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} }
|
func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} }
|
||||||
|
|
||||||
|
// Subscription returns generated.SubscriptionResolver implementation.
|
||||||
|
func (r *Resolver) Subscription() generated.SubscriptionResolver { return &subscriptionResolver{r} }
|
||||||
|
|
||||||
type (
|
type (
|
||||||
mutationResolver struct{ *Resolver }
|
mutationResolver struct{ *Resolver }
|
||||||
queryResolver struct{ *Resolver }
|
queryResolver struct{ *Resolver }
|
||||||
|
subscriptionResolver struct{ *Resolver }
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
//go:build tools
|
//go:build tools
|
||||||
// +build tools
|
|
||||||
|
|
||||||
package graph
|
package graph
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user