Compare commits

...

167 Commits

Author SHA1 Message Date
Unbound Release 6eac3a7796 chore(release): prepare for v0.6.1 2025-08-22 14:33:00 +02:00
Renovate 890a6fd50e fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.221 2025-08-22 09:58:39 +00:00
Renovate e1cf0d8cb3 chore(deps): update golang docker tag to v1.25.0 2025-08-14 18:57:49 +00:00
Renovate 63d70d7e35 chore(deps): update golang:1.24.6 docker digest to cd8f653 2025-08-14 13:57:53 +00:00
Renovate 35a454f8b1 fix(deps): update module github.com/sparetimecoders/goamqp to v0.3.3 2025-08-14 13:01:31 +00:00
Renovate 6651553246 chore(deps): update pre-commit hook golangci/golangci-lint to v2.4.0 2025-08-13 20:58:38 +00:00
Renovate 311ef3f530 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.220 2025-08-13 09:58:44 +00:00
Renovate d8cce2fb05 chore(deps): update golang:1.24.6 docker digest to 958bfd1 2025-08-12 22:58:04 +00:00
Renovate 309b9423a4 chore(deps): update pre-commit hook pre-commit/pre-commit-hooks to v6 2025-08-09 19:58:04 +00:00
Renovate 323145a076 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.219 2025-08-08 10:57:11 +00:00
Renovate 28b4dc5572 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.218 2025-08-07 15:57:39 +00:00
Renovate c1173c20ae chore(deps): update golang docker tag to v1.24.6 2025-08-06 20:58:16 +00:00
Renovate 2d12077016 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.217 2025-08-06 12:57:31 +00:00
Renovate c38db83cd1 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.216 2025-08-06 09:58:51 +00:00
Renovate 25bd438d05 chore(deps): update pre-commit hook golangci/golangci-lint to v2.3.1 2025-08-02 21:58:23 +00:00
Renovate f4355d620f fix(deps): update module github.com/golang-jwt/jwt/v5 to v5.3.0 2025-07-31 22:14:05 +02:00
Renovate 887ba69c5e fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.215 2025-07-31 22:12:36 +02:00
Renovate 8e6c7aade7 chore(deps): update goreleaser/goreleaser docker tag to v2.11.2 2025-07-31 14:11:53 +00:00
Renovate 0f0f50111f fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.213 2025-07-29 00:05:28 +00:00
Renovate 81a895e5a6 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.212 2025-07-28 15:57:36 +00:00
Renovate 0fab1d5098 fix(deps): update module github.com/99designs/gqlgen to v0.17.78 2025-07-28 12:21:43 +02:00
Renovate 4fbfc0f42e chore(deps): update goreleaser/goreleaser docker tag to v2.11.1 2025-07-25 02:57:47 +00:00
Renovate 0ba3706c12 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.210 2025-07-22 19:56:58 +00:00
Renovate c44ac87b5e chore(deps): update golang:1.24.5 docker digest to 0a156a4 2025-07-22 04:57:28 +00:00
Renovate deefcd7045 chore(deps): update pre-commit hook golangci/golangci-lint to v2.3.0 2025-07-21 20:04:12 +02:00
Renovate 4933857351 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.208 2025-07-21 14:57:27 +00:00
Renovate 18616e8346 fix(deps): update module github.com/alecthomas/kong to v1.12.1 2025-07-21 07:37:41 +02:00
Renovate dd075afb8d chore(deps): update pre-commit hook gitleaks/gitleaks to v8.28.0 2025-07-20 16:56:45 +00:00
Renovate 003bd3cd50 fix(deps): update module github.com/golang-jwt/jwt/v5 to v5.2.3 2025-07-15 21:09:48 +02:00
Renovate a68fb437dc fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.207 2025-07-15 17:54:08 +00:00
Renovate 8aa57e8f68 chore(deps): update pre-commit hook golangci/golangci-lint to v2.2.2 2025-07-11 12:54:20 +00:00
Renovate 84e8764054 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.204 2025-07-11 06:54:06 +00:00
Renovate c40bbad892 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.203 2025-07-10 09:54:19 +00:00
Renovate c159c6d20e chore(deps): update goreleaser/goreleaser docker tag to v2.11.0 2025-07-09 21:49:06 +02:00
Renovate ae0d796e93 chore(deps): update golang docker tag to v1.24.5 2025-07-09 18:55:13 +00:00
Renovate 1ec0f9a3a7 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.202 2025-07-09 12:54:39 +00:00
Renovate 0dad651959 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.200 2025-07-08 15:54:10 +00:00
Renovate 24fcc4e6a2 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.199 2025-07-07 15:54:28 +00:00
Renovate 4c7406d97b fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.198 2025-07-04 12:54:27 +00:00
Renovate 51affc5a55 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.197 2025-07-03 11:54:02 +00:00
Renovate 10871a9b32 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.196 2025-07-02 17:54:39 +00:00
Renovate 411b51f895 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.195 2025-07-02 02:22:25 +00:00
Renovate 6a478209ea chore(deps): update golang:1.24.4 docker digest to 9f820b6 2025-07-01 05:54:30 +00:00
Renovate 043ca65698 chore(deps): update pre-commit hook golangci/golangci-lint to v2.2.1 2025-06-29 21:53:56 +00:00
Unbound Release 8131042a1c chore(release): prepare for v0.6.0 2025-06-29 13:35:39 +02:00
Renovate 2fb2c1947a fix(deps): update module github.com/99designs/gqlgen to v0.17.76 2025-06-29 10:25:22 +02:00
Renovate 1cf4faa17f fix(deps): update module github.com/vektah/gqlparser/v2 to v2.5.30 2025-06-28 23:55:22 +00:00
Renovate 8bb6cb7279 chore(deps): update pre-commit hook golangci/golangci-lint to v2.2.0 2025-06-28 20:54:12 +00:00
Renovate 376ae41b4f fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.194 2025-06-28 09:21:08 +02:00
Renovate dc6e57e815 fix(deps): update module github.com/vektah/gqlparser/v2 to v2.5.29 2025-06-27 21:54:30 +00:00
Renovate f8c7de447a fix(deps): update module go.opentelemetry.io/contrib/bridges/otelslog to v0.12.0 2025-06-25 20:02:41 +00:00
Renovate 92050aa31f fix(deps): update opentelemetry-go monorepo 2025-06-25 07:54:48 +00:00
Renovate e20829bb2b fix(deps): update module github.com/alecthomas/kong to v1.12.0 2025-06-25 00:54:50 +00:00
Renovate 1918ec3da4 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.192 2025-06-19 09:03:08 +00:00
Renovate 735c387c58 fix(deps): update module github.com/99designs/gqlgen to v0.17.75 2025-06-16 14:55:10 +00:00
Renovate 98e2f660a6 fix(deps): update module github.com/vektah/gqlparser/v2 to v2.5.28 2025-06-15 20:54:42 +00:00
Renovate 7a0159a33f fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.190 2025-06-13 16:54:19 +00:00
argoyle b4447bb15e feat: add build version injection via CI_COMMIT argument
Inject the build version into the binary using the CI_COMMIT 
argument for better traceability of deployments. Update the 
Dockerfile to pass the commit hash to the build process, 
ensuring that each build contains version information tied 
to the specific commit.
2025-06-13 13:26:56 +02:00
argoyle 2948905005 feat(k8s): add OpenTelemetry exporter endpoint to deploy.yaml
Add the OTEL_EXPORTER_OTLP_ENDPOINT environment variable to 
the deployment configuration. This change enables the application 
to send telemetry data to the specified OpenTelemetry collector 
endpoint for better monitoring and observability.
2025-06-13 11:36:19 +02:00
Unbound Release 53141720ca chore(release): prepare for v0.5.3 2025-06-13 11:28:30 +02:00
argoyle e84df1db08 refactor: remove Sentry integration and replace with OpenTelemetry
Remove Sentry dependencies and configuration. Introduce monitoring 
setup for OpenTelemetry. Update logging to include log format 
options, and replace Sentry error handling middleware with 
monitoring handlers for GraphQL playground. Adjust environment 
variable handling to enhance configuration clarity and flexibility.
2025-06-13 11:00:52 +02:00
Renovate 9539e6bb1b fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.189 2025-06-12 19:14:49 +00:00
Renovate 291ef08ad7 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.188 2025-06-11 17:54:30 +00:00
Renovate 98b84772df chore(deps): update golang:1.24.4 docker digest to 3494bbe 2025-06-11 03:01:58 +00:00
Renovate 26278066b8 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.187 2025-06-10 10:53:51 +00:00
Unbound Release 5bdacce71a chore(release): prepare for v0.5.2 2025-06-09 06:33:38 +00:00
argoyle 0b4bbdeef0 fix(goreleaser): specify binary name in configuration
Adds the binary name "schemactl" to the Goreleaser 
configuration file to ensure proper build and release 
process for the Homebrew tap. This improves clarity 
and correctness in the configuration.
2025-06-09 08:22:34 +02:00
Unbound Release 3c3c939447 chore(release): prepare for v0.5.1 2025-06-09 08:00:57 +02:00
Renovate 93a12a2909 chore(deps): update goreleaser/goreleaser docker tag to v2.10.2 2025-06-09 07:10:55 +02:00
Renovate c36802570a chore(deps): update pre-commit hook gitleaks/gitleaks to v8.27.2 2025-06-09 00:54:24 +00:00
Renovate 5d64a3a45c chore(deps): update pre-commit hook gitleaks/gitleaks to v8.27.1 2025-06-08 02:53:51 +00:00
Renovate e55d3400e6 chore(deps): update golang docker tag to v1.24.4 2025-06-05 20:54:48 +00:00
Renovate 7da95e7566 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.186 2025-06-05 14:54:09 +00:00
Renovate b8ea2690fc fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.185 2025-06-04 10:54:07 +00:00
Renovate 3689486fa8 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.184 2025-06-03 22:54:02 +00:00
Renovate 1787815299 fix(deps): update module github.com/99designs/gqlgen to v0.17.74 2025-06-02 17:56:04 +00:00
Renovate 2886835d18 chore(deps): update pre-commit hook gitleaks/gitleaks to v8.27.0 2025-06-01 16:54:04 +00:00
Renovate 097e1274db fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.183 2025-05-28 18:55:37 +00:00
Renovate 640ede7de2 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.182 2025-05-27 10:53:51 +00:00
Renovate 122c87dab4 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.181 2025-05-23 10:53:47 +00:00
Renovate 4647d7ad1e chore(deps): update golang:1.24.3 docker digest to f255a7d 2025-05-22 11:23:04 +02:00
Renovate f2c73e8bf6 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.180 2025-05-21 16:54:04 +00:00
Renovate ba7bbd082a fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.179 2025-05-19 11:54:14 +00:00
Renovate 2466d2a4ab fix(deps): update module github.com/khan/genqlient to v0.8.1 2025-05-18 19:53:47 +00:00
Renovate 86a61a1a64 fix(deps): update module github.com/getsentry/sentry-go to v0.33.0 2025-05-15 12:55:30 +00:00
Renovate 75e85c0339 fix(deps): update module github.com/alecthomas/kong to v1.11.0 2025-05-15 11:04:36 +00:00
Unbound Release d654ef1b81 chore(release): prepare for v0.5.0 2025-05-15 12:57:56 +02:00
argoyle 55114c3d39 fix(k8s): update apiVersion for external secrets
Update apiVersion in the secrets.yaml file from v1beta1 to v1 to 
ensure compatibility with the latest external-secrets API. This 
change maintains the stability and functionality of secrets 
management in Kubernetes deployments.
2025-05-15 10:17:09 +02:00
Renovate 0575c45d66 chore(deps): update pre-commit hook gitleaks/gitleaks to v8.26.0 2025-05-12 21:54:21 +00:00
Renovate d004745244 fix(deps): update module github.com/vektah/gqlparser/v2 to v2.5.27 2025-05-07 11:54:54 +00:00
Renovate 36ef6a85c2 fix(deps): update module github.com/pressly/goose/v3 to v3.24.3 2025-05-07 01:55:31 +00:00
Renovate aa8363428f chore(deps): update golang docker tag to v1.24.3 2025-05-06 20:54:50 +00:00
Renovate 36a387040f fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.178 2025-05-06 17:56:47 +00:00
Renovate 5cf10efe15 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.177 2025-05-06 14:54:10 +00:00
Renovate 73624e21d7 chore(deps): update pre-commit hook golangci/golangci-lint to v2.1.6 2025-05-04 15:53:50 +00:00
Renovate f53321368d fix(deps): update module github.com/99designs/gqlgen to v0.17.73 2025-05-03 16:37:30 +02:00
argoyle 59e0f17769 chore(ci): update GitLab CI configuration for templates
Adds a new template file 'Defaults.gitlab-ci.yml' to the CI
configuration and adjusts the include path for clarity. This
ensures better organization and standardization in the CI/CD
processes associated with the project.
2025-05-01 09:23:30 +02:00
Renovate 8661c931a1 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.176 2025-04-30 20:54:01 +00:00
Renovate f484bea8c4 chore(deps): update pre-commit hook gitleaks/gitleaks to v8.25.1 2025-04-30 13:54:22 +00:00
Renovate 8c4f579cef chore(deps): update goreleaser/goreleaser docker tag to v2.9.0 2025-04-30 02:53:40 +00:00
Renovate 30ccbf9aab fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.175 2025-04-29 16:54:01 +00:00
Renovate 5973c1341d chore(deps): update pre-commit hook gitleaks/gitleaks to v8.25.0 2025-04-29 14:54:52 +00:00
Renovate 0285549431 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.174 2025-04-29 13:54:18 +00:00
argoyle 3256819705 feat(k8s): add PodDisruptionBudget for schemas service
Create a PodDisruptionBudget to ensure minimum availability of the 
schemas service during voluntary disruptions. This enhances the 
service's resilience and ensures high availability.
2025-04-29 09:51:37 +02:00
Renovate 578354ddeb chore(deps): update golang:1.24.2 docker digest to bf7899c 2025-04-29 07:39:48 +02:00
Renovate 12adc9bc48 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.173 2025-04-25 22:54:16 +00:00
Renovate a44937e130 chore(deps): update pre-commit hook golangci/golangci-lint to v2.1.5 2025-04-24 19:54:11 +00:00
Renovate 04a88bf310 fix(deps): update module github.com/vektah/gqlparser/v2 to v2.5.26 2025-04-24 18:54:31 +00:00
Renovate c1e5ee97ee chore(deps): update pre-commit hook golangci/golangci-lint to v2.1.4 2025-04-24 17:56:17 +00:00
Unbound Release 66dd948181 chore(release): prepare for v0.4.1 2025-04-24 14:44:21 +02:00
Renovate 6fc87e952b fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.172 2025-04-22 18:54:20 +00:00
Renovate dade16a10c fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.171 2025-04-22 09:55:07 +00:00
Renovate aa617ae11d fix(deps): update module github.com/99designs/gqlgen to v0.17.72 2025-04-19 00:56:32 +00:00
Renovate a87b480345 fix(deps): update module github.com/99designs/gqlgen to v0.17.71 2025-04-18 10:23:36 +02:00
Renovate 69e232cd7c fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.170 2025-04-17 19:53:50 +00:00
Renovate 5adfe0e711 fix(deps): update module github.com/vektah/gqlparser/v2 to v2.5.25 2025-04-17 12:55:01 +00:00
Renovate 7fa947a945 chore(deps): update pre-commit hook golangci/golangci-lint to v2.1.2 2025-04-15 13:55:14 +00:00
Renovate a4552cb418 chore(deps): update pre-commit hook golangci/golangci-lint to v2.1.1 2025-04-12 18:55:16 +00:00
Unbound Release c15371c236 chore(release): prepare for v0.4.0 2025-04-12 14:08:29 +02:00
argoyle aaa111dd20 feat(service): implement graceful shutdown for HTTP server
Add a context with timeout to handle graceful shutdown of the HTTP 
server. Update error handling during the server's close to include 
context-aware shutdown. Ensure that the server properly logs only 
non-closed errors when listening.
2025-04-12 13:41:02 +02:00
argoyle 8e02bfb0a2 refactor(deploy): remove cpu and memory limits for schemas
Removes the CPU and memory limits for the schemas container in the
Kubernetes deployment configuration. This change is made to allow
for greater flexibility in resource allocation based on runtime
demands, ensuring better performance in varying load conditions.
2025-04-12 10:44:13 +02:00
Renovate 1e34fe77eb chore(deps): update pre-commit hook gitleaks/gitleaks to v8.24.3 2025-04-11 14:54:14 +00:00
Renovate 30ca9091d2 fix(deps): update module gitlab.com/unboundsoftware/eventsourced/amqp to v1.8.1 2025-04-11 09:56:34 +00:00
argoyle 4dd79e3d73 fix(k8s): increase CPU request for better performance
Adjusts the CPU requests from "10m" to "20m" in the deploy.yaml file to 
improve application performance and ensure stability under load.
2025-04-10 17:19:48 +02:00
Renovate bdfbf6c22e fix(deps): update module github.com/getsentry/sentry-go to v0.32.0 2025-04-10 09:56:22 +00:00
Renovate b6a281b5f2 fix(deps): update module github.com/vektah/gqlparser/v2 to v2.5.24 2025-04-09 22:54:35 +00:00
Renovate e8305441bb fix(deps): update module github.com/sparetimecoders/goamqp to v0.3.2 2025-04-09 13:55:36 +00:00
argoyle dd5c0f3dc0 fix(secrets): remove namespace from ExternalSecret definition
This change removes the namespace field from the ExternalSecret 
definition in the secrets.yaml file, allowing for more flexible 
deployment within different namespaces without the need for 
modification.
2025-04-08 11:27:12 +02:00
Unbound Release f35be93cb6 chore(release): prepare for v0.3.0 2025-04-08 10:42:13 +02:00
Renovate 3840c40c90 chore(deps): update golang:1.24.2 docker digest to aebb7df 2025-04-08 08:24:05 +02:00
argoyle 2ba10d763d feat(k8s): add RabbitMQ configurations and update secrets
Add a new extract for RabbitMQ in the secrets and include
AMQP_URL in local secrets. Update the merge policy and
engine version in the deployment template. Remove unused
RabbitMQ secret reference from the deployment. These changes
improve configuration management and ensure consistency
between environments.
2025-04-08 07:49:54 +02:00
Renovate ba099eff51 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.169 2025-04-07 16:54:25 +00:00
Renovate 2196f5a417 chore(deps): update golang docker tag to v1.24.2 2025-04-01 22:31:52 +02:00
Renovate 3e26aa0166 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.168 2025-04-01 16:54:09 +00:00
Renovate fdf6402b7c fix(deps): update eventsourced 2025-04-01 12:54:52 +00:00
Renovate c6a5711dff fix(deps): update module github.com/alecthomas/kong to v1.10.0 2025-04-01 07:26:41 +02:00
Renovate f82935e71a chore(deps): update goreleaser/goreleaser docker tag to v2.8.2 2025-04-01 02:53:25 +00:00
Renovate b8053b6273 fix(deps): update module github.com/pressly/goose/v3 to v3.24.2 2025-03-28 02:54:25 +00:00
Renovate 4086ddf73c fix(deps): update module gitlab.com/unboundsoftware/eventsourced/eventsourced to v1.19.1 2025-03-27 08:55:53 +00:00
Renovate 8d5ff3863d fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.167 2025-03-26 23:53:39 +00:00
Renovate 19233af4a7 fix(deps): update module github.com/99designs/gqlgen to v0.17.70 2025-03-26 14:54:27 +00:00
Renovate b6ed3c7ad9 fix(deps): update module github.com/99designs/gqlgen to v0.17.69 2025-03-26 08:53:17 +01:00
Renovate 05eaa96d37 chore(deps): update pre-commit hook golangci/golangci-lint to v2.0.2 2025-03-26 08:47:48 +01:00
Renovate 9b8f98c2d2 fix(deps): update module gitlab.com/unboundsoftware/eventsourced/eventsourced to v1.19.0 2025-03-25 20:54:41 +00:00
Renovate d6a862ee94 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.166 2025-03-25 17:54:57 +00:00
Renovate 574e6c8926 chore(deps): update pre-commit hook golangci/golangci-lint to v2.0.1 2025-03-24 20:53:49 +00:00
Renovate 15eda6f0de chore(deps): update pre-commit hook golangci/golangci-lint to v2 2025-03-24 14:45:39 +01:00
Renovate 46b624568e chore(deps): update pre-commit hook gitleaks/gitleaks to v8.24.2 2025-03-22 12:53:29 +00:00
Renovate 72bbf92265 fix(deps): update module github.com/golang-jwt/jwt/v5 to v5.2.2 2025-03-21 20:53:44 +00:00
Renovate 313e43016b chore(deps): update golang:1.24.1 docker digest to 5ecf333 2025-03-18 03:53:41 +00:00
Renovate 570a0114b3 chore(deps): update pre-commit hook golangci/golangci-lint to v1.64.8 2025-03-17 20:53:41 +00:00
Renovate a9c07bf4c2 fix(deps): update module github.com/99designs/gqlgen to v0.17.68 2025-03-17 08:39:58 +01:00
Renovate f126c23b45 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.165 2025-03-14 12:53:49 +00:00
Renovate 65dc35a5fc chore(deps): update goreleaser/goreleaser docker tag to v2.8.1 2025-03-14 02:53:00 +00:00
Renovate b57080c9d0 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.164 2025-03-13 18:54:37 +00:00
Renovate 19a826608c chore(deps): update goreleaser/goreleaser docker tag to v2.8.0 2025-03-13 04:53:08 +00:00
Renovate 316d4a4c34 chore(deps): update pre-commit hook golangci/golangci-lint to v1.64.7 2025-03-11 23:53:18 +00:00
Renovate 48873bf5ee chore(deps): update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.22.0 2025-03-11 14:53:36 +00:00
Renovate f9cce092b5 fix(deps): update module github.com/alecthomas/kong to v1.9.0 2025-03-11 06:53:43 +00:00
Renovate ae8aa21388 fix(deps): update module gitlab.com/unboundsoftware/eventsourced/eventsourced to v1.18.1 2025-03-10 16:01:25 +00:00
Renovate 7ba1d3ae08 fix(deps): update module gitlab.com/unboundsoftware/eventsourced/eventsourced to v1.18.0 2025-03-09 19:54:00 +00:00
Renovate fd6e4a0cbd fix(deps): update module github.com/auth0/go-jwt-middleware/v2 to v2.3.0 2025-03-05 10:53:54 +00:00
Renovate 856b140538 chore(deps): update golang docker tag to v1.24.1 2025-03-05 11:22:36 +01:00
Renovate fdfbf823a6 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.163 2025-03-04 19:54:01 +00:00
Renovate 697e6c3d75 fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.162 2025-03-03 15:53:43 +00:00
Renovate fdbb57e33a fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.161 2025-03-03 13:53:34 +00:00
Renovate 07057d7206 chore(deps): update pre-commit hook golangci/golangci-lint to v1.64.6 2025-03-02 23:53:20 +00:00
25 changed files with 775 additions and 443 deletions
+6 -4
View File
@@ -1,5 +1,7 @@
include:
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
- project: unboundsoftware/ci-templates
file: Defaults.gitlab-ci.yml
- project: unboundsoftware/ci-templates
file: Release.gitlab-ci.yml
- project: unboundsoftware/ci-templates
@@ -19,7 +21,7 @@ variables:
check:
stage: .pre
image: amd64/golang:1.24.0@sha256:4a3f1013f696a1f86314902f2c9907fe712eabc91e911cc9fde4fdc57a16d35d
image: amd64/golang:1.25.0@sha256:36e95221032d4c929d001ae5c1059ba1fbe1dec3b1f5c74d2708583d3141e151
script:
- go install mvdan.cc/gofumpt@latest
- go install golang.org/x/tools/cmd/goimports@latest
@@ -38,7 +40,7 @@ build:
vulnerabilities:
stage: build
image: amd64/golang:1.24.0@sha256:4a3f1013f696a1f86314902f2c9907fe712eabc91e911cc9fde4fdc57a16d35d
image: amd64/golang:1.25.0@sha256:36e95221032d4c929d001ae5c1059ba1fbe1dec3b1f5c74d2708583d3141e151
script:
- go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck ./...
@@ -59,7 +61,7 @@ deploy-prod:
check_release:
stage: test
image:
name: goreleaser/goreleaser:v2.7.0@sha256:41247b711fc423eddcd8395b998b9de5c7d169bfe99e6a474ba35e87896c1343
name: goreleaser/goreleaser:v2.11.2@sha256:649e73dbf38046e0fdfbb74b74df89a51530ab6bd846dfc36319fe2d1221ca71
entrypoint: [ '' ]
variables:
GOTOOLCHAIN: auto
@@ -72,7 +74,7 @@ release:
needs:
- unbound_release_prepare_release
image:
name: goreleaser/goreleaser:v2.7.0@sha256:41247b711fc423eddcd8395b998b9de5c7d169bfe99e6a474ba35e87896c1343
name: goreleaser/goreleaser:v2.11.2@sha256:649e73dbf38046e0fdfbb74b74df89a51530ab6bd846dfc36319fe2d1221ca71
entrypoint: [ '' ]
variables:
# Disable shallow cloning so that goreleaser can diff between tags to
+20 -1
View File
@@ -1,3 +1,22 @@
version: "2"
run:
allow-parallel-runners: true
timeout: 5m
linters:
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
+10 -4
View File
@@ -16,18 +16,24 @@ builds:
- amd64
- arm64
brews:
homebrew_casks:
- name: unbound-schemas
repository:
owner: unboundsoftware
name: homebrew-taps
directory: Formula
install: |
bin.install "schemactl"
binary: schemactl
directory: Casks
conflicts:
- formula: unbound-schemas
commit_author:
name: "Joakim Olsson"
email: joakim@unbound.se
homepage: "https://schemas.unbound.se/"
hooks:
post:
install: |
# replace foo with the actual binary name
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/schemactl"]
archives:
- id: unbound-schemas
+4 -4
View File
@@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
@@ -18,7 +18,7 @@ repos:
- --project
- unboundsoftware/schemas
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.21.0
rev: v9.22.0
hooks:
- id: commitlint
stages: [ commit-msg ]
@@ -37,11 +37,11 @@ repos:
- id: go-test
- id: gofumpt
- repo: https://github.com/golangci/golangci-lint
rev: v1.64.5
rev: v2.4.0
hooks:
- id: golangci-lint-full
- repo: https://github.com/gitleaks/gitleaks
rev: v8.24.0
rev: v8.28.0
hooks:
- id: gitleaks
exclude: '^ctl/generated.go|graph/generated/.*$|^graph/model/models_gen.go|^tools/.*$$'
+161 -13
View File
@@ -1,7 +1,166 @@
# Changelog
## [0.6.1] - 2025-08-22
All notable changes to this project will be documented in this file.
### 🐛 Bug Fixes
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.195
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.196
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.197
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.198
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.199
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.200
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.202
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.203
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.204
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.207
- *(deps)* Update module github.com/golang-jwt/jwt/v5 to v5.2.3
- *(deps)* Update module github.com/alecthomas/kong to v1.12.1
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.208
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.210
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.78
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.212
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.213
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.215
- *(deps)* Update module github.com/golang-jwt/jwt/v5 to v5.3.0
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.216
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.217
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.218
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.219
- *(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/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.221
## [0.6.0] - 2025-06-29
### 🚀 Features
- *(k8s)* Add OpenTelemetry exporter endpoint to deploy.yaml
- Add build version injection via CI_COMMIT argument
### 🐛 Bug Fixes
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.190
- *(deps)* Update module github.com/vektah/gqlparser/v2 to v2.5.28
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.75
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.192
- *(deps)* Update module github.com/alecthomas/kong to v1.12.0
- *(deps)* Update opentelemetry-go monorepo
- *(deps)* Update module go.opentelemetry.io/contrib/bridges/otelslog to v0.12.0
- *(deps)* Update module github.com/vektah/gqlparser/v2 to v2.5.29
- *(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/99designs/gqlgen to v0.17.76
## [0.5.3] - 2025-06-13
### 🐛 Bug Fixes
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.187
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.188
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.189
### 🚜 Refactor
- Remove Sentry integration and replace with OpenTelemetry
## [0.5.2] - 2025-06-09
### 🐛 Bug Fixes
- *(goreleaser)* Specify binary name in configuration
## [0.5.1] - 2025-06-09
### 🐛 Bug Fixes
- *(deps)* Update module github.com/alecthomas/kong to v1.11.0
- *(deps)* Update module github.com/getsentry/sentry-go to v0.33.0
- *(deps)* Update module github.com/khan/genqlient to v0.8.1
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.179
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.180
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.181
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.182
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.183
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.74
- *(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.186
## [0.5.0] - 2025-05-15
### 🚀 Features
- *(k8s)* Add PodDisruptionBudget for schemas service
### 🐛 Bug Fixes
- *(deps)* Update module github.com/vektah/gqlparser/v2 to v2.5.26
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.173
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.174
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.175
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.176
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.73
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.177
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.178
- *(deps)* Update module github.com/pressly/goose/v3 to v3.24.3
- *(deps)* Update module github.com/vektah/gqlparser/v2 to v2.5.27
- *(k8s)* Update apiVersion for external secrets
### ⚙️ Miscellaneous Tasks
- *(ci)* Update GitLab CI configuration for templates
## [0.4.1] - 2025-04-24
### 🐛 Bug Fixes
- *(deps)* Update module github.com/vektah/gqlparser/v2 to v2.5.25
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.170
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.71
- *(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.172
## [0.4.0] - 2025-04-12
### 🚀 Features
- *(service)* Implement graceful shutdown for HTTP server
### 🐛 Bug Fixes
- *(secrets)* Remove namespace from ExternalSecret definition
- *(deps)* Update module github.com/sparetimecoders/goamqp to v0.3.2
- *(deps)* Update module github.com/vektah/gqlparser/v2 to v2.5.24
- *(deps)* Update module github.com/getsentry/sentry-go to v0.32.0
- *(k8s)* Increase CPU request for better performance
- *(deps)* Update module gitlab.com/unboundsoftware/eventsourced/amqp to v1.8.1
### 🚜 Refactor
- *(deploy)* Remove cpu and memory limits for schemas
## [0.3.0] - 2025-04-08
### 🚀 Features
- *(k8s)* Add RabbitMQ configurations and update secrets
### 🐛 Bug Fixes
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.161
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.162
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.163
- *(deps)* Update module github.com/auth0/go-jwt-middleware/v2 to v2.3.0
- *(deps)* Update module gitlab.com/unboundsoftware/eventsourced/eventsourced to v1.18.0
- *(deps)* Update module gitlab.com/unboundsoftware/eventsourced/eventsourced to v1.18.1
- *(deps)* Update module github.com/alecthomas/kong to v1.9.0
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.164
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.165
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.68
- *(deps)* Update module github.com/golang-jwt/jwt/v5 to v5.2.2
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.166
- *(deps)* Update module gitlab.com/unboundsoftware/eventsourced/eventsourced to v1.19.0
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.69
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.70
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.167
- *(deps)* Update module gitlab.com/unboundsoftware/eventsourced/eventsourced to v1.19.1
- *(deps)* Update module github.com/pressly/goose/v3 to v3.24.2
- *(deps)* Update module github.com/alecthomas/kong to v1.10.0
- *(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.169
## [0.2.0] - 2025-02-28
### 🚀 Features
@@ -28,7 +187,6 @@ All notable changes to this project will be documented in this file.
- *(go)* Update go version to 1.23.6 and remove toolchain
- *(docker)* Update base image architecture to amd64
## [0.1.1] - 2025-01-24
### 🐛 Bug Fixes
@@ -39,7 +197,6 @@ All notable changes to this project will be documented in this file.
- *(deps)* Update module github.com/pressly/goose/v3 to v3.24.1
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.63
- *(k8s)* Standardize app label to app.kubernetes.io/name
## [0.1.0] - 2025-01-01
### 🚀 Features
@@ -82,7 +239,6 @@ All notable changes to this project will be documented in this file.
- Remove unnecessary Docker variables from configuration
- *(ci)* Remove unused docker service from buildtools
## [0.0.7] - 2024-10-22
### 🐛 Bug Fixes
@@ -130,7 +286,6 @@ All notable changes to this project will be documented in this file.
- Update goreleaser image to v2.3.1
- Add generate check
- Add release notes for goreleaser command in .gitlab-ci.yml
## [0.0.6] - 2024-04-04
### 🐛 Bug Fixes
@@ -140,7 +295,6 @@ All notable changes to this project will be documented in this file.
### ⚙️ Miscellaneous Tasks
- Add step for checking release
## [0.0.5] - 2024-04-03
### 🚀 Features
@@ -176,7 +330,6 @@ All notable changes to this project will be documented in this file.
- Run release on medium instance
- Back to small and upgrade goreleaser
- Remove deprecated replacements
## [0.0.4] - 2023-05-29
### 🐛 Bug Fixes
@@ -188,7 +341,6 @@ All notable changes to this project will be documented in this file.
- Update Go version for vulnerabilities
- Update pre-commit and fix golangci-lint
- Actually validate API key privileges and refs
## [0.0.3] - 2023-04-27
### 🚀 Features
@@ -219,14 +371,12 @@ All notable changes to this project will be documented in this file.
- Reduce sample rate
- Update to Go 1.20.3
- Fix Gitlab CI lint
## [0.0.2] - 2022-10-14
### ⚙️ Miscellaneous Tasks
- Add docker ignore
- Handle push of unchanged schema
## [0.0.1] - 2022-10-09
### 🚀 Features
@@ -236,5 +386,3 @@ All notable changes to this project will be documented in this file.
### 🐛 Bug Fixes
- Remove GITLAB_TOKEN
<!-- generated by git-cliff -->
+3 -2
View File
@@ -1,9 +1,10 @@
FROM amd64/golang:1.24.0@sha256:4a3f1013f696a1f86314902f2c9907fe712eabc91e911cc9fde4fdc57a16d35d as modules
FROM amd64/golang:1.25.0@sha256:36e95221032d4c929d001ae5c1059ba1fbe1dec3b1f5c74d2708583d3141e151 as modules
WORKDIR /build
ADD go.* /build
RUN go mod download
FROM modules as build
ARG CI_COMMIT
WORKDIR /build
ENV CGO_ENABLED=0
ADD . /build
@@ -17,7 +18,7 @@ RUN GOOS=linux GOARCH=amd64 go build \
-a -installsuffix cgo \
-mod=readonly \
-o /release/service \
-ldflags '-w -s' \
-ldflags "-w -s -X main.buildVersion=${CI_COMMIT}" \
./cmd/service/service.go
FROM scratch as export
+4 -4
View File
@@ -2,9 +2,9 @@ package cache
import (
"fmt"
"log/slog"
"time"
"github.com/apex/log"
"github.com/sparetimecoders/goamqp"
"gitlab.com/unboundsoftware/schemas/domain"
@@ -18,7 +18,7 @@ type Cache struct {
services map[string]map[string]map[string]struct{}
subGraphs map[string]string
lastUpdate map[string]string
logger log.Interface
logger *slog.Logger
}
func (c *Cache) OrganizationByAPIKey(apiKey string) *domain.Organization {
@@ -98,7 +98,7 @@ func (c *Cache) Update(msg any, _ goamqp.Headers) (any, error) {
case *domain.SubGraph:
c.updateSubGraph(m.OrganizationId, m.Ref, m.ID.String(), m.Service, m.ChangedAt)
default:
c.logger.Warnf("unexpected message received: %+v", msg)
c.logger.With("msg", msg).Warn("unexpected message received")
}
return nil, nil
}
@@ -124,7 +124,7 @@ func (c *Cache) addUser(sub string, organization domain.Organization) {
}
}
func New(logger log.Interface) *Cache {
func New(logger *slog.Logger) *Cache {
return &Cache{
organizations: make(map[string]domain.Organization),
users: make(map[string][]string),
+29 -62
View File
@@ -2,7 +2,9 @@ package main
import (
"context"
"errors"
"fmt"
"log/slog"
"net/http"
"os"
"os/signal"
@@ -17,10 +19,6 @@ import (
"github.com/99designs/gqlgen/graphql/handler/transport"
"github.com/99designs/gqlgen/graphql/playground"
"github.com/alecthomas/kong"
"github.com/apex/log"
"github.com/apex/log/handlers/json"
"github.com/getsentry/sentry-go"
sentryhttp "github.com/getsentry/sentry-go/http"
"github.com/rs/cors"
"github.com/sparetimecoders/goamqp"
"github.com/vektah/gqlparser/v2/ast"
@@ -32,7 +30,9 @@ import (
"gitlab.com/unboundsoftware/schemas/domain"
"gitlab.com/unboundsoftware/schemas/graph"
"gitlab.com/unboundsoftware/schemas/graph/generated"
"gitlab.com/unboundsoftware/schemas/logging"
"gitlab.com/unboundsoftware/schemas/middleware"
"gitlab.com/unboundsoftware/schemas/monitoring"
"gitlab.com/unboundsoftware/schemas/store"
)
@@ -40,16 +40,12 @@ type CLI struct {
AmqpURL string `name:"amqp-url" env:"AMQP_URL" help:"URL to use to connect to RabbitMQ" default:"amqp://user:password@unbound-control-plane.orb.local:5672/"`
Port int `name:"port" env:"PORT" help:"Listen-port for GraphQL API" default:"8080"`
LogLevel string `name:"log-level" env:"LOG_LEVEL" help:"The level of logging to use (debug, info, warn, error, fatal)" default:"info"`
LogFormat string `name:"log-format" env:"LOG_FORMAT" help:"The format of logs" default:"text" enum:"otel,json,text"`
DatabaseURL string `name:"postgres-url" env:"POSTGRES_URL" help:"URL to use to connect to Postgres" default:"postgres://postgres:postgres@unbound-control-plane.orb.local:5432/schemas?sslmode=disable"`
DatabaseDriverName string `name:"db-driver" env:"DB_DRIVER" help:"Driver to use to connect to db" default:"postgres"`
Issuer string `name:"issuer" env:"ISSUER" help:"The JWT token issuer to use" default:"unbound.eu.auth0.com"`
StrictSSL bool `name:"strict-ssl" env:"STRICT_SSL" help:"Should strict SSL handling be enabled" default:"true"`
SentryConfig
}
type SentryConfig struct {
DSN string `name:"sentry-dsn" env:"SENTRY_DSN" help:"Sentry dsn" default:""`
Environment string `name:"sentry-environment" env:"SENTRY_ENVIRONMENT" help:"Sentry environment" default:"development"`
Environment string `name:"environment" env:"ENVIRONMENT" help:"The environment we are running in" default:"development" enum:"development,staging,production"`
}
var buildVersion = "none"
@@ -59,9 +55,7 @@ const serviceName = "schemas"
func main() {
var cli CLI
_ = kong.Parse(&cli)
log.SetHandler(json.New(os.Stdout))
log.SetLevelFromString(cli.LogLevel)
logger := log.WithField("service", serviceName)
logger := logging.SetupLogger(cli.LogLevel, cli.LogFormat, serviceName, buildVersion)
closeEvents := make(chan error)
if err := start(
@@ -70,19 +64,22 @@ func main() {
ConnectAMQP,
cli,
); err != nil {
logger.WithError(err).Error("process error")
logger.With("error", err).Error("process error")
}
}
func start(closeEvents chan error, logger *log.Entry, connectToAmqpFunc func(url string) (Connection, error), cli CLI) error {
if err := setupSentry(logger, cli.SentryConfig); err != nil {
return err
}
defer sentry.Flush(2 * time.Second)
func start(closeEvents chan error, logger *slog.Logger, connectToAmqpFunc func(url string) (Connection, error), cli CLI) error {
rootCtx, rootCancel := context.WithCancel(context.Background())
defer rootCancel()
shutdownFn, err := monitoring.SetupOTelSDK(rootCtx, cli.LogFormat == "otel", serviceName, buildVersion, cli.Environment)
if err != nil {
return err
}
defer func() {
_ = errors.Join(shutdownFn(context.Background()))
}()
db, err := store.SetupDB(cli.DatabaseDriverName, cli.DatabaseURL)
if err != nil {
return fmt.Errorf("failed to setup DB: %v", err)
@@ -123,7 +120,7 @@ func start(closeEvents chan error, logger *log.Entry, connectToAmqpFunc func(url
return fmt.Errorf("caching subgraphs: %w", err)
}
setups := []goamqp.Setup{
goamqp.UseLogger(logger.Error),
goamqp.UseLogger(func(s string) { logger.Error(s) }),
goamqp.CloseListener(closeEvents),
goamqp.WithPrefetchLimit(20),
goamqp.EventStreamPublisher(publisher),
@@ -169,7 +166,7 @@ func start(closeEvents chan error, logger *log.Entry, connectToAmqpFunc func(url
defer wg.Done()
err := <-closeEvents
if err != nil {
logger.WithError(err).Error("received close from AMQP")
logger.With("error", err).Error("received close from AMQP")
rootCancel()
}
}()
@@ -179,8 +176,11 @@ func start(closeEvents chan error, logger *log.Entry, connectToAmqpFunc func(url
defer wg.Done()
<-rootCtx.Done()
if err := httpSrv.Close(); err != nil {
logger.WithError(err).Error("close http server")
shutdownCtx, shutdownRelease := context.WithTimeout(context.Background(), 10*time.Second)
defer shutdownRelease()
if err := httpSrv.Shutdown(shutdownCtx); err != nil {
logger.With("error", err).Error("close http server")
}
close(sigint)
close(closeEvents)
@@ -222,11 +222,10 @@ func start(closeEvents chan error, logger *log.Entry, connectToAmqpFunc func(url
Cache: lru.New[string](100),
})
sentryHandler := sentryhttp.New(sentryhttp.Options{Repanic: true})
mux.Handle("/", sentryHandler.HandleFunc(playground.Handler("GraphQL playground", "/query")))
mux.Handle("/", monitoring.Handler(playground.Handler("GraphQL playground", "/query")))
mux.Handle("/health", http.HandlerFunc(healthFunc))
mux.Handle("/query", cors.AllowAll().Handler(
sentryHandler.Handle(
monitoring.Handler(
mw.Middleware().CheckJWT(
apiKeyMiddleware.Handler(
authMiddleware.Handler(srv),
@@ -235,10 +234,10 @@ func start(closeEvents chan error, logger *log.Entry, connectToAmqpFunc func(url
),
))
logger.Infof("connect to http://localhost:%d/ for GraphQL playground", cli.Port)
logger.Info(fmt.Sprintf("connect to http://localhost:%d/ for GraphQL playground", cli.Port))
if err := httpSrv.ListenAndServe(); err != nil {
logger.WithError(err).Error("listen http")
if err := httpSrv.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) {
logger.With("error", err).Error("listen http")
}
}()
@@ -287,38 +286,6 @@ func healthFunc(w http.ResponseWriter, _ *http.Request) {
_, _ = w.Write([]byte("OK"))
}
func setupSentry(logger log.Interface, args SentryConfig) error {
if args.Environment == "" {
return fmt.Errorf("no Sentry environment supplied, exiting")
}
cfg := sentry.ClientOptions{
Dsn: args.DSN,
Environment: args.Environment,
Release: fmt.Sprintf("%s-%s", serviceName, buildVersion),
}
switch args.Environment {
case "development":
cfg.Debug = true
cfg.EnableTracing = false
cfg.TracesSampleRate = 0.0
case "production":
if args.DSN == "" {
return fmt.Errorf("no DSN supplied for non-dev environment, exiting")
}
cfg.Debug = false
cfg.EnableTracing = true
cfg.TracesSampleRate = 0.01
default:
return fmt.Errorf("illegal environment %s", args.Environment)
}
if err := sentry.Init(cfg); err != nil {
return fmt.Errorf("sentry setup: %w", err)
}
logger.Infof("configured Sentry for env: %s", args.Environment)
return nil
}
func ConnectAMQP(url string) (Connection, error) {
return goamqp.NewFromURL(serviceName, url)
}
+45 -24
View File
@@ -1,37 +1,50 @@
module gitlab.com/unboundsoftware/schemas
go 1.23.6
go 1.24.4
require (
github.com/99designs/gqlgen v0.17.66
github.com/Khan/genqlient v0.8.0
github.com/alecthomas/kong v1.8.1
github.com/99designs/gqlgen v0.17.78
github.com/Khan/genqlient v0.8.1
github.com/alecthomas/kong v1.12.1
github.com/apex/log v1.9.0
github.com/auth0/go-jwt-middleware/v2 v2.2.2
github.com/getsentry/sentry-go v0.31.1
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/auth0/go-jwt-middleware/v2 v2.3.0
github.com/golang-jwt/jwt/v5 v5.3.0
github.com/jmoiron/sqlx v1.4.0
github.com/pkg/errors v0.9.1
github.com/pressly/goose/v3 v3.24.1
github.com/pressly/goose/v3 v3.24.3
github.com/rs/cors v1.11.1
github.com/sparetimecoders/goamqp v0.3.1
github.com/sparetimecoders/goamqp v0.3.3
github.com/stretchr/testify v1.10.0
github.com/vektah/gqlparser/v2 v2.5.23
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.160
gitlab.com/unboundsoftware/eventsourced/amqp v1.8.0
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.17.0
gitlab.com/unboundsoftware/eventsourced/pg v1.16.0
github.com/vektah/gqlparser/v2 v2.5.30
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.221
gitlab.com/unboundsoftware/eventsourced/amqp v1.8.1
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.19.2
gitlab.com/unboundsoftware/eventsourced/pg v1.17.0
go.opentelemetry.io/contrib/bridges/otelslog v0.12.0
go.opentelemetry.io/otel v1.37.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.37.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.37.0
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.13.0
go.opentelemetry.io/otel/log v0.13.0
go.opentelemetry.io/otel/sdk v1.37.0
go.opentelemetry.io/otel/sdk/log v0.13.0
go.opentelemetry.io/otel/sdk/metric v1.37.0
go.opentelemetry.io/otel/trace v1.37.0
)
require (
github.com/agnivade/levenshtein v1.2.1 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/cenkalti/backoff/v5 v5.0.2 // 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/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/mfridman/interpolate v0.0.2 // indirect
@@ -44,15 +57,23 @@ require (
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/urfave/cli/v2 v2.27.5 // indirect
github.com/urfave/cli/v2 v2.27.7 // 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/otel/exporters/otlp/otlptrace v1.37.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/mod v0.23.0 // indirect
golang.org/x/net v0.35.0 // indirect
golang.org/x/sync v0.11.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.22.0 // indirect
golang.org/x/tools v0.30.0 // indirect
golang.org/x/mod v0.26.0 // indirect
golang.org/x/net v0.42.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/sys v0.34.0 // indirect
golang.org/x/text v0.27.0 // indirect
golang.org/x/tools v0.35.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
google.golang.org/grpc v1.73.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
+119 -78
View File
@@ -1,25 +1,25 @@
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
github.com/99designs/gqlgen v0.17.66 h1:2/SRc+h3115fCOZeTtsqrB5R5gTGm+8qCAwcrZa+CXA=
github.com/99designs/gqlgen v0.17.66/go.mod h1:gucrb5jK5pgCKzAGuOMMVU9C8PnReecHEHd2UxLQwCg=
github.com/99designs/gqlgen v0.17.78 h1:bhIi7ynrc3js2O8wu1sMQj1YHPENDt3jQGyifoBvoVI=
github.com/99designs/gqlgen v0.17.78/go.mod h1:yI/o31IauG2kX0IsskM4R894OCCG1jXJORhtLQqB7Oc=
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/Khan/genqlient v0.8.0 h1:Hd1a+E1CQHYbMEKakIkvBH3zW0PWEeiX6Hp1i2kP2WE=
github.com/Khan/genqlient v0.8.0/go.mod h1:hn70SpYjWteRGvxTwo0kfaqg4wxvndECGkfa1fdDdYI=
github.com/PuerkitoBio/goquery v1.9.3 h1:mpJr/ikUA9/GNJB/DBZcGeFDXUtosHRyRrwh7KGdTG0=
github.com/PuerkitoBio/goquery v1.9.3/go.mod h1:1ndLHPdTz+DyQPICCWYlYQMPl0oXZj0G6D4LCYA6u4U=
github.com/Khan/genqlient v0.8.1 h1:wtOCc8N9rNynRLXN3k3CnfzheCUNKBcvXmVv5zt6WCs=
github.com/Khan/genqlient v0.8.1/go.mod h1:R2G6DzjBvCbhjsEajfRjbWdVglSH/73kSivC9TLWVjU=
github.com/PuerkitoBio/goquery v1.10.3 h1:pFYcNSqHxBD06Fpj/KsbStFRsgRATgnf3LeXiUkhzPo=
github.com/PuerkitoBio/goquery v1.10.3/go.mod h1:tMUX0zDMHXYlAQk6p35XxQMqMweEKB7iK7iLNd4RH4Y=
github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KOX7eoM=
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/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/kong v1.8.1 h1:6aamvWBE/REnR/BCq10EcozmcpUPc5aGI1lPAWdB0EE=
github.com/alecthomas/kong v1.8.1/go.mod h1:p2vqieVMeTAnaC83txKtXe8FLke2X07aruPWXyMPQrU=
github.com/alecthomas/kong v1.12.1 h1:iq6aMJDcFYP9uFrLdsiZQ2ZMmcshduyGv4Pek0MQPW0=
github.com/alecthomas/kong v1.12.1/go.mod h1:p2vqieVMeTAnaC83txKtXe8FLke2X07aruPWXyMPQrU=
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
github.com/alecthomas/repr v0.4.0/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/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=
github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU=
github.com/andybalholm/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kktS1LM=
github.com/andybalholm/cascadia v1.3.3/go.mod h1:xNd9bqTn98Ln4DwST8/nG+H0yuB8Hmgu1YHNnWw0GeA=
github.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0=
github.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA=
github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo=
@@ -27,16 +27,18 @@ github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy
github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
github.com/auth0/go-jwt-middleware/v2 v2.2.2 h1:vrvkFZf72r3Qbt45KLjBG3/6Xq2r3NTixWKu2e8de9I=
github.com/auth0/go-jwt-middleware/v2 v2.2.2/go.mod h1:4vwxpVtu/Kl4c4HskT+gFLjq0dra8F1joxzamrje6J0=
github.com/auth0/go-jwt-middleware/v2 v2.3.0 h1:4QREj6cS3d8dS05bEm443jhnqQF97FX9sMBeWqnNRzE=
github.com/auth0/go-jwt-middleware/v2 v2.3.0/go.mod h1:dL4ObBs1/dj4/W4cYxd8rqAdDGXYyd5rqbpMIxcbVrU=
github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=
github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
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/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.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -46,26 +48,32 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/getsentry/sentry-go v0.31.1 h1:ELVc0h7gwyhnXHDouXkhqTFSO5oslsRDk0++eyE0KJ4=
github.com/getsentry/sentry-go v0.31.1/go.mod h1:CYNcMMz73YigoHljQRG+qPF+eMq8gG72XcGN/p71BAY=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss=
github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/go-sql-driver/mysql v1.9.2 h1:4cNKDYQ1I84SXslGddlsrMhc8k4LeDVj6Ad6WRjiHuU=
github.com/go-sql-driver/mysql v1.9.2/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU=
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=
github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 h1:X5VWvz21y3gzm9Nw/kaUeku/1+uBhcekkmy4IkffJww=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1/go.mod h1:Zanoh4+gvIgluNqcfMVTJueD4wSS5hT7zTt4Mrutd90=
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
@@ -82,8 +90,9 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
@@ -101,30 +110,28 @@ github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdh
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
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/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pressly/goose/v3 v3.24.1 h1:bZmxRco2uy5uu5Ng1MMVEfYsFlrMJI+e/VMXHQ3C4LY=
github.com/pressly/goose/v3 v3.24.1/go.mod h1:rEWreU9uVtt0DHCyLzF9gRcWiiTF/V+528DV+4DORug=
github.com/pressly/goose/v3 v3.24.3 h1:DSWWNwwggVUsYZ0X2VitiAa9sKuqtBfe+Jr9zFGwWlM=
github.com/pressly/goose/v3 v3.24.3/go.mod h1:v9zYL4xdViLHCUUJh/mhjnm6JrK7Eul8AS93IxiZM4E=
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/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
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/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/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U=
github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y=
github.com/sebdah/goldie/v2 v2.5.3/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI=
github.com/sebdah/goldie/v2 v2.7.1 h1:PkBHymaYdtvEkZV7TmyqKxdmn5/Vcj+8TpATWZjnG5E=
github.com/sebdah/goldie/v2 v2.7.1/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I=
@@ -135,8 +142,8 @@ github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h
github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs=
github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4=
github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg=
github.com/sparetimecoders/goamqp v0.3.1 h1:NCzdyAz84G679HlO+ivhyoI1aMgXEe3qfqpn4EChu1s=
github.com/sparetimecoders/goamqp v0.3.1/go.mod h1:PjkgrmsuMVgRbiQDTLs0pCWYrcQgqcUee38JjCDZdlk=
github.com/sparetimecoders/goamqp v0.3.3 h1:z/nfTPmrjeU/rIVuNOgsVLCimp3WFoNFvS3ZzXRJ6HE=
github.com/sparetimecoders/goamqp v0.3.3/go.mod h1:W9NRCpWLE+Vruv2dcRSbszNil2O826d2Nv6kAkETW5o=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
@@ -159,53 +166,93 @@ 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-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=
github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=
github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w=
github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
github.com/vektah/gqlparser/v2 v2.5.23 h1:PurJ9wpgEVB7tty1seRUwkIDa/QH5RzkzraiKIjKLfA=
github.com/vektah/gqlparser/v2 v2.5.23/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo=
github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU=
github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4=
github.com/vektah/gqlparser/v2 v2.5.30 h1:EqLwGAFLIzt1wpx1IPpY67DwUujF1OfzgEyDsLrN6kE=
github.com/vektah/gqlparser/v2 v2.5.30/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo=
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/graphql-go-tools/v2 v2.0.0-rc.160 h1:whZcpumOJNwJg71M56VGZ/Ex4TnYeGjmzhWa6+1X+uI=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.160/go.mod h1:B7eV0Qh8Lop9QzIOQcsvKp3S0ejfC6mgyWoJnI917yQ=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.221 h1:+Gti+5xU36ANUmeYqtaNbDpVHQ0O2Dxhy8yT2w6pIfI=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.221/go.mod h1:DnYY1alnsgzkanSwbFiFIdXKOuf8dHQWQ2P4BzTc6aI=
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.8.0 h1:Ez3UuXvveyV/HlphqWUWZU/05DuhqKfgF9r6tCJigEI=
gitlab.com/unboundsoftware/eventsourced/amqp v1.8.0/go.mod h1:HO9ZBFAvBNRhVS3hXPuGMW7zyENDfoqjLCUAzPWw3so=
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.17.0 h1:CWttfHbytJb7eZ1hflwYkQ7W/c9meHLOjjxguPeZm28=
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.17.0/go.mod h1:KeLn3U67hxbdFLfeXd0c0LI/r1C5rijbWrfNdARWe98=
gitlab.com/unboundsoftware/eventsourced/pg v1.16.0 h1:n4ZoGseeBM/+12pRxMdNI0XYPaWghxPGJNcWbN30c0o=
gitlab.com/unboundsoftware/eventsourced/pg v1.16.0/go.mod h1:zHnnTcR7xzh6Z/iZASZaDQpFsa8kefcXDbcMEeFFbNc=
gitlab.com/unboundsoftware/eventsourced/amqp v1.8.1 h1:MGHH2Uxp68J9i4V3/3vApB6gjBUjn6RjiPHhbc8Wsno=
gitlab.com/unboundsoftware/eventsourced/amqp v1.8.1/go.mod h1:clGBkdpFWb5/27aLOhJ6+DB15enJf+T4J5lR6X0lqAs=
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.19.2 h1:8sCnThNHEPB3BQomcJ7u6fmc2t043fAZSMmVPDDbQOs=
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.19.2/go.mod h1:KeLn3U67hxbdFLfeXd0c0LI/r1C5rijbWrfNdARWe98=
gitlab.com/unboundsoftware/eventsourced/pg v1.17.0 h1:pUJzMpNPX0GVsffRZXlpKR1d7Ws96KTxJwbLFPpASSc=
gitlab.com/unboundsoftware/eventsourced/pg v1.17.0/go.mod h1:WgPrZhyCbsZ3TG2tPUbh2MUjOEaANJjsWi/0hlIwRVU=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/contrib/bridges/otelslog v0.12.0 h1:lFM7SZo8Ce01RzRfnUFQZEYeWRf/MtOA3A5MobOqk2g=
go.opentelemetry.io/contrib/bridges/otelslog v0.12.0/go.mod h1:Dw05mhFtrKAYu72Tkb3YBYeQpRUJ4quDgo2DQw3No5A=
go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ=
go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I=
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.37.0 h1:9PgnL3QNlj10uGxExowIDIZu66aVBwWhXmbOp1pa6RA=
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.37.0/go.mod h1:0ineDcLELf6JmKfuo0wvvhAVMuxWFYvkTin2iV4ydPQ=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 h1:Ahq7pZmv87yiyn3jeFz/LekZmPLLdKejuO3NcK9MssM=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0/go.mod h1:MJTqhM0im3mRLw1i8uGHnCvUEeS7VwRyxlLC78PA18M=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.37.0 h1:bDMKF3RUSxshZ5OjOTi8rsHGaPKsAt76FaqgvIUySLc=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.37.0/go.mod h1:dDT67G/IkA46Mr2l9Uj7HsQVwsjASyV9SjGofsiUZDA=
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.13.0 h1:yEX3aC9KDgvYPhuKECHbOlr5GLwH6KTjLJ1sBSkkxkc=
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.13.0/go.mod h1:/GXR0tBmmkxDaCUGahvksvp66mx4yh5+cFXgSlhg0vQ=
go.opentelemetry.io/otel/log v0.13.0 h1:yoxRoIZcohB6Xf0lNv9QIyCzQvrtGZklVbdCoyb7dls=
go.opentelemetry.io/otel/log v0.13.0/go.mod h1:INKfG4k1O9CL25BaM1qLe0zIedOpvlS5Z7XgSbmN83E=
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
go.opentelemetry.io/otel/sdk/log v0.13.0 h1:I3CGUszjM926OphK8ZdzF+kLqFvfRY/IIoFq/TjwfaQ=
go.opentelemetry.io/otel/sdk/log v0.13.0/go.mod h1:lOrQyCCXmpZdN7NchXb6DOZZa1N5G1R2tm5GMMTpDBw=
go.opentelemetry.io/otel/sdk/log/logtest v0.13.0 h1:9yio6AFZ3QD9j9oqshV1Ibm9gPLlHNxurno5BreMtIA=
go.opentelemetry.io/otel/sdk/log/logtest v0.13.0/go.mod h1:QOGiAJHl+fob8Nu85ifXfuQYmJTFAvcrxL6w5/tu168=
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os=
go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
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-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=
golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=
golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg=
golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ=
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-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
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.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY=
golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY=
golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0=
golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw=
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 h1:oWVWY3NzT7KJppx2UKhKmzPq4SRe0LdCijVRwvGeikY=
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822/go.mod h1:h3c4v36UTKzUiuaOKQ6gr3S+0hovBtUrXzTG/i3+XEc=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 h1:fc6jSaCT0vBduLYZHYrBBNY4dsWuvgyff9noRNDdBeE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok=
google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc=
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
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-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
@@ -220,17 +267,11 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C
gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI=
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4=
modernc.org/libc v1.55.3 h1:AzcW1mhlPNrRtjS5sS+eW2ISCgSOLLNyFzRh/V3Qj/U=
modernc.org/libc v1.55.3/go.mod h1:qFXepLhz+JjFThQ4kzwzOjA/y/artDeg+pcYnY+Q83w=
modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo=
modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E=
modernc.org/memory v1.8.0/go.mod h1:XPZ936zp5OMKGWPqbD3JShgd/ZoQ7899TUuQqxY+peU=
modernc.org/sqlite v1.34.1 h1:u3Yi6M0N8t9yKRDwhXcyp1eS5/ErhPTBggxWFuR6Hfk=
modernc.org/sqlite v1.34.1/go.mod h1:pXV2xHxhzXZsgT/RtTFAPY6JJDEvOTcTdwADQCCWD4k=
modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA=
modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0=
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
modernc.org/libc v1.65.0 h1:e183gLDnAp9VJh6gWKdTy0CThL9Pt7MfcR/0bgb7Y1Y=
modernc.org/libc v1.65.0/go.mod h1:7m9VzGq7APssBTydds2zBcxGREwvIGpuUBaKTXdm2Qs=
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
modernc.org/memory v1.10.0 h1:fzumd51yQ1DxcOxSO+S6X7+QTuVU+n8/Aj7swYjFfC4=
modernc.org/memory v1.10.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
modernc.org/sqlite v1.37.0 h1:s1TMe7T3Q3ovQiK2Ouz4Jwh7dw4ZDqbebSDTlSJdfjI=
modernc.org/sqlite v1.37.0/go.mod h1:5YiWv+YviqGMuGw4V+PNplcyaJ5v+vQd7TQOgkACoJM=
+32 -229
View File
@@ -128,7 +128,7 @@ func (e *executableSchema) Schema() *ast.Schema {
return parsedSchema
}
func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]any) (int, bool) {
func (e *executableSchema) Complexity(ctx context.Context, typeName, field string, childComplexity int, rawArgs map[string]any) (int, bool) {
ec := executionContext{nil, e, 0, 0, nil}
_ = ec
switch typeName + "." + field {
@@ -187,7 +187,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
break
}
args, err := ec.field_Mutation_addAPIKey_args(context.TODO(), rawArgs)
args, err := ec.field_Mutation_addAPIKey_args(ctx, rawArgs)
if err != nil {
return 0, false
}
@@ -199,7 +199,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
break
}
args, err := ec.field_Mutation_addOrganization_args(context.TODO(), rawArgs)
args, err := ec.field_Mutation_addOrganization_args(ctx, rawArgs)
if err != nil {
return 0, false
}
@@ -211,7 +211,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
break
}
args, err := ec.field_Mutation_updateSubGraph_args(context.TODO(), rawArgs)
args, err := ec.field_Mutation_updateSubGraph_args(ctx, rawArgs)
if err != nil {
return 0, false
}
@@ -258,7 +258,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
break
}
args, err := ec.field_Query_supergraph_args(context.TODO(), rawArgs)
args, err := ec.field_Query_supergraph_args(ctx, rawArgs)
if err != nil {
return 0, false
}
@@ -556,328 +556,122 @@ var parsedSchema = gqlparser.MustLoadSchema(sources...)
func (ec *executionContext) dir_auth_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := ec.dir_auth_argsUser(ctx, rawArgs)
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "user", ec.unmarshalOBoolean2ᚖbool)
if err != nil {
return nil, err
}
args["user"] = arg0
arg1, err := ec.dir_auth_argsOrganization(ctx, rawArgs)
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "organization", ec.unmarshalOBoolean2ᚖbool)
if err != nil {
return nil, err
}
args["organization"] = arg1
return args, nil
}
func (ec *executionContext) dir_auth_argsUser(
ctx context.Context,
rawArgs map[string]any,
) (*bool, error) {
if _, ok := rawArgs["user"]; !ok {
var zeroVal *bool
return zeroVal, nil
}
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("user"))
if tmp, ok := rawArgs["user"]; ok {
return ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
}
var zeroVal *bool
return zeroVal, nil
}
func (ec *executionContext) dir_auth_argsOrganization(
ctx context.Context,
rawArgs map[string]any,
) (*bool, error) {
if _, ok := rawArgs["organization"]; !ok {
var zeroVal *bool
return zeroVal, nil
}
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("organization"))
if tmp, ok := rawArgs["organization"]; ok {
return ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
}
var zeroVal *bool
return zeroVal, nil
}
func (ec *executionContext) field_Mutation_addAPIKey_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := ec.field_Mutation_addAPIKey_argsInput(ctx, rawArgs)
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalOInputAPIKey2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐInputAPIKey)
if err != nil {
return nil, err
}
args["input"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_addAPIKey_argsInput(
ctx context.Context,
rawArgs map[string]any,
) (*model.InputAPIKey, error) {
if _, ok := rawArgs["input"]; !ok {
var zeroVal *model.InputAPIKey
return zeroVal, nil
}
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
if tmp, ok := rawArgs["input"]; ok {
return ec.unmarshalOInputAPIKey2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐInputAPIKey(ctx, tmp)
}
var zeroVal *model.InputAPIKey
return zeroVal, nil
}
func (ec *executionContext) field_Mutation_addOrganization_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := ec.field_Mutation_addOrganization_argsName(ctx, rawArgs)
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "name", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["name"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_addOrganization_argsName(
ctx context.Context,
rawArgs map[string]any,
) (string, error) {
if _, ok := rawArgs["name"]; !ok {
var zeroVal string
return zeroVal, nil
}
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
if tmp, ok := rawArgs["name"]; ok {
return ec.unmarshalNString2string(ctx, tmp)
}
var zeroVal string
return zeroVal, nil
}
func (ec *executionContext) field_Mutation_updateSubGraph_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := ec.field_Mutation_updateSubGraph_argsInput(ctx, rawArgs)
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNInputSubGraph2gitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐInputSubGraph)
if err != nil {
return nil, err
}
args["input"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_updateSubGraph_argsInput(
ctx context.Context,
rawArgs map[string]any,
) (model.InputSubGraph, error) {
if _, ok := rawArgs["input"]; !ok {
var zeroVal model.InputSubGraph
return zeroVal, nil
}
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
if tmp, ok := rawArgs["input"]; ok {
return ec.unmarshalNInputSubGraph2gitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐInputSubGraph(ctx, tmp)
}
var zeroVal model.InputSubGraph
return zeroVal, nil
}
func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := ec.field_Query___type_argsName(ctx, rawArgs)
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "name", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["name"] = arg0
return args, nil
}
func (ec *executionContext) field_Query___type_argsName(
ctx context.Context,
rawArgs map[string]any,
) (string, error) {
if _, ok := rawArgs["name"]; !ok {
var zeroVal string
return zeroVal, nil
}
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
if tmp, ok := rawArgs["name"]; ok {
return ec.unmarshalNString2string(ctx, tmp)
}
var zeroVal string
return zeroVal, nil
}
func (ec *executionContext) field_Query_supergraph_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := ec.field_Query_supergraph_argsRef(ctx, rawArgs)
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "ref", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["ref"] = arg0
arg1, err := ec.field_Query_supergraph_argsIsAfter(ctx, rawArgs)
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "isAfter", ec.unmarshalOString2ᚖstring)
if err != nil {
return nil, err
}
args["isAfter"] = arg1
return args, nil
}
func (ec *executionContext) field_Query_supergraph_argsRef(
ctx context.Context,
rawArgs map[string]any,
) (string, error) {
if _, ok := rawArgs["ref"]; !ok {
var zeroVal string
return zeroVal, nil
}
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("ref"))
if tmp, ok := rawArgs["ref"]; ok {
return ec.unmarshalNString2string(ctx, tmp)
}
var zeroVal string
return zeroVal, nil
}
func (ec *executionContext) field_Query_supergraph_argsIsAfter(
ctx context.Context,
rawArgs map[string]any,
) (*string, error) {
if _, ok := rawArgs["isAfter"]; !ok {
var zeroVal *string
return zeroVal, nil
}
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("isAfter"))
if tmp, ok := rawArgs["isAfter"]; ok {
return ec.unmarshalOString2ᚖstring(ctx, tmp)
}
var zeroVal *string
return zeroVal, nil
}
func (ec *executionContext) field___Directive_args_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := ec.field___Directive_args_argsIncludeDeprecated(ctx, rawArgs)
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2ᚖbool)
if err != nil {
return nil, err
}
args["includeDeprecated"] = arg0
return args, nil
}
func (ec *executionContext) field___Directive_args_argsIncludeDeprecated(
ctx context.Context,
rawArgs map[string]any,
) (*bool, error) {
if _, ok := rawArgs["includeDeprecated"]; !ok {
var zeroVal *bool
return zeroVal, nil
}
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
if tmp, ok := rawArgs["includeDeprecated"]; ok {
return ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
}
var zeroVal *bool
return zeroVal, nil
}
func (ec *executionContext) field___Field_args_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := ec.field___Field_args_argsIncludeDeprecated(ctx, rawArgs)
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2ᚖbool)
if err != nil {
return nil, err
}
args["includeDeprecated"] = arg0
return args, nil
}
func (ec *executionContext) field___Field_args_argsIncludeDeprecated(
ctx context.Context,
rawArgs map[string]any,
) (*bool, error) {
if _, ok := rawArgs["includeDeprecated"]; !ok {
var zeroVal *bool
return zeroVal, nil
}
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
if tmp, ok := rawArgs["includeDeprecated"]; ok {
return ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
}
var zeroVal *bool
return zeroVal, nil
}
func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := ec.field___Type_enumValues_argsIncludeDeprecated(ctx, rawArgs)
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2bool)
if err != nil {
return nil, err
}
args["includeDeprecated"] = arg0
return args, nil
}
func (ec *executionContext) field___Type_enumValues_argsIncludeDeprecated(
ctx context.Context,
rawArgs map[string]any,
) (bool, error) {
if _, ok := rawArgs["includeDeprecated"]; !ok {
var zeroVal bool
return zeroVal, nil
}
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
if tmp, ok := rawArgs["includeDeprecated"]; ok {
return ec.unmarshalOBoolean2bool(ctx, tmp)
}
var zeroVal bool
return zeroVal, nil
}
func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := ec.field___Type_fields_argsIncludeDeprecated(ctx, rawArgs)
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2bool)
if err != nil {
return nil, err
}
args["includeDeprecated"] = arg0
return args, nil
}
func (ec *executionContext) field___Type_fields_argsIncludeDeprecated(
ctx context.Context,
rawArgs map[string]any,
) (bool, error) {
if _, ok := rawArgs["includeDeprecated"]; !ok {
var zeroVal bool
return zeroVal, nil
}
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
if tmp, ok := rawArgs["includeDeprecated"]; ok {
return ec.unmarshalOBoolean2bool(ctx, tmp)
}
var zeroVal bool
return zeroVal, nil
}
// endregion ***************************** args.gotpl *****************************
@@ -5574,6 +5368,7 @@ func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v any) (
}
func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
_ = sel
res := graphql.MarshalBoolean(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
@@ -5589,6 +5384,7 @@ func (ec *executionContext) unmarshalNID2string(ctx context.Context, v any) (str
}
func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
_ = sel
res := graphql.MarshalID(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
@@ -5609,6 +5405,7 @@ func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v any) (int,
}
func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
_ = sel
res := graphql.MarshalInt(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
@@ -5682,6 +5479,7 @@ func (ec *executionContext) unmarshalNString2string(ctx context.Context, v any)
}
func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
_ = sel
res := graphql.MarshalString(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
@@ -5693,9 +5491,7 @@ func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.S
func (ec *executionContext) unmarshalNString2ᚕstringᚄ(ctx context.Context, v any) ([]string, error) {
var vSlice []any
if v != nil {
vSlice = graphql.CoerceList(v)
}
vSlice = graphql.CoerceList(v)
var err error
res := make([]string, len(vSlice))
for i := range vSlice {
@@ -5797,6 +5593,7 @@ func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v an
}
func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
_ = sel
res := graphql.MarshalTime(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
@@ -5914,6 +5711,7 @@ func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Con
}
func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
_ = sel
res := graphql.MarshalString(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
@@ -5925,9 +5723,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte
func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v any) ([]string, error) {
var vSlice []any
if v != nil {
vSlice = graphql.CoerceList(v)
}
vSlice = graphql.CoerceList(v)
var err error
res := make([]string, len(vSlice))
for i := range vSlice {
@@ -6104,6 +5900,7 @@ func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v a
}
func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
_ = sel
res := graphql.MarshalString(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
@@ -6119,6 +5916,8 @@ func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v any) (
}
func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
_ = sel
_ = ctx
res := graphql.MarshalBoolean(v)
return res
}
@@ -6135,6 +5934,8 @@ func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast
if v == nil {
return graphql.Null
}
_ = sel
_ = ctx
res := graphql.MarshalBoolean(*v)
return res
}
@@ -6159,6 +5960,8 @@ func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel as
if v == nil {
return graphql.Null
}
_ = sel
_ = ctx
res := graphql.MarshalString(*v)
return res
}
+2 -2
View File
@@ -3,8 +3,8 @@ package graph
import (
"context"
"fmt"
"log/slog"
"github.com/apex/log"
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
"gitlab.com/unboundsoftware/schemas/cache"
@@ -26,7 +26,7 @@ type Publisher interface {
type Resolver struct {
EventStore eventsourced.EventStore
Publisher Publisher
Logger log.Interface
Logger *slog.Logger
Cache *cache.Cache
}
+7
View File
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: schemas
data:
LOG_FORMAT: "otel"
ENVIRONMENT: "production"
+6
View File
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: schemas
data:
ENVIRONMENT: "development"
+6 -6
View File
@@ -41,11 +41,8 @@ spec:
containers:
- name: schemas
resources:
limits:
cpu: "500m"
memory: "100Mi"
requests:
cpu: "10m"
cpu: "20m"
memory: "20Mi"
readinessProbe:
httpGet:
@@ -59,11 +56,14 @@ spec:
ports:
- name: api
containerPort: 8080
env:
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://k8s-monitoring-alloy-receiver.monitoring.svc.cluster.local:4318
envFrom:
- secretRef:
- configMapRef:
name: schemas
- secretRef:
name: rabbitmq
name: schemas
restartPolicy: Always
serviceAccountName: schemas
---
+9
View File
@@ -0,0 +1,9 @@
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: schemas-pdb
spec:
minAvailable: 1
selector:
matchLabels:
app.kubernetes.io/name: schemas
+1
View File
@@ -5,3 +5,4 @@ metadata:
stringData:
API_KEY: supersecret123!
POSTGRES_URL: "postgres://postgres:postgres@postgres:5432/schemas?sslmode=disable"
AMQP_URL: "amqp://user:password@rabbitmq:5672/"
+5 -4
View File
@@ -1,8 +1,7 @@
apiVersion: external-secrets.io/v1beta1
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: schemas
namespace: default
spec:
refreshInterval: 1h
secretStoreRef:
@@ -11,13 +10,15 @@ spec:
target:
creationPolicy: Owner
template:
mergePolicy: Merge
engineVersion: 'v2'
data:
POSTGRES_URL: "postgres://{{ .DB_USERNAME }}:{{ .DB_PASSWORD }}@{{ .DB_HOST }}:{{ .DB_PORT }}/schemas?sslmode=disable"
API_KEY: "{{ .API_KEY }}"
SENTRY_DSN: "{{ .SENTRY_DSN }}"
SENTRY_ENVIRONMENT: "{{ .SENTRY_ENVIRONMENT }}"
dataFrom:
- extract:
key: services/schemas
- extract:
key: rds/postgres/prod-psql
- extract:
key: mq/rabbit/prod
+65
View File
@@ -0,0 +1,65 @@
package logging
import (
"context"
"log/slog"
"os"
"go.opentelemetry.io/contrib/bridges/otelslog"
)
type Logger interface {
Info(msg string, args ...any)
Warn(msg string, args ...any)
Error(msg string, args ...any)
}
var defaultLogger *slog.Logger
type contextKey string
const loggerKey = contextKey("logger")
func SetupLogger(logLevel, logFormat, serviceName, buildVersion string) *slog.Logger {
var leveler slog.LevelVar
err := leveler.UnmarshalText([]byte(logLevel))
handlerOpts := &slog.HandlerOptions{
AddSource: false,
Level: leveler.Level(),
ReplaceAttr: nil,
}
var handler slog.Handler
switch logFormat {
case "json":
handler = slog.NewJSONHandler(os.Stdout, handlerOpts)
case "text":
handler = slog.NewTextHandler(os.Stdout, handlerOpts)
case "otel":
handler = otelslog.NewHandler(serviceName,
otelslog.WithVersion(buildVersion))
}
defaultLogger = slog.New(handler).With("service", serviceName).With("version", buildVersion)
if err != nil {
defaultLogger.With("err", err).Error("Failed to parse log level")
os.Exit(1)
}
slog.SetDefault(defaultLogger)
return defaultLogger
}
// ContextWithLogger returns a new Context with the logger attached
func ContextWithLogger(ctx context.Context, logger *slog.Logger) context.Context {
return context.WithValue(ctx, loggerKey, logger)
}
// LoggerFromContext returns a logger from the passed context or the default logger
func LoggerFromContext(ctx context.Context) *slog.Logger {
logger := ctx.Value(loggerKey)
if l, ok := logger.(*slog.Logger); ok {
return l
}
return defaultLogger
}
+48
View File
@@ -0,0 +1,48 @@
package logging
import (
"bytes"
"log/slog"
"strings"
"testing"
"github.com/stretchr/testify/assert"
)
func NewMockLogger() *MockLogger {
logged := &bytes.Buffer{}
return &MockLogger{
logged: logged,
logger: slog.New(slog.NewTextHandler(logged, &slog.HandlerOptions{
ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr {
if a.Key == "time" {
return slog.Attr{}
}
return a
},
})),
}
}
type MockLogger struct {
logger *slog.Logger
logged *bytes.Buffer
}
func (m *MockLogger) Logger() *slog.Logger {
return m.logger
}
func (m *MockLogger) Check(t testing.TB, wantLogged []string) {
var gotLogged []string
if m.logged.String() != "" {
gotLogged = strings.Split(m.logged.String(), "\n")
gotLogged = gotLogged[:len(gotLogged)-1]
}
if len(wantLogged) == 0 {
assert.Empty(t, gotLogged)
return
}
assert.Equal(t, wantLogged, gotLogged)
}
+41
View File
@@ -0,0 +1,41 @@
package monitoring
import (
"context"
"fmt"
"github.com/99designs/gqlgen/graphql"
"go.opentelemetry.io/otel/trace"
)
func AroundOperations(ctx context.Context, next graphql.OperationHandler) graphql.ResponseHandler {
op := graphql.GetOperationContext(ctx)
spanName := fmt.Sprintf("graphql:operation:%s", op.OperationName)
// Span always injected in the http handler above
sp := trace.SpanFromContext(ctx)
if sp != nil {
sp.SetName(spanName)
}
return next(ctx)
}
func AroundRootFields(ctx context.Context, next graphql.RootResolver) graphql.Marshaler {
oc := graphql.GetRootFieldContext(ctx)
spanCtx, span := StartSpan(ctx, fmt.Sprintf("graphql:rootfield:%s", oc.Field.Name))
defer span.Finish()
return next(spanCtx)
}
func AroundFields(ctx context.Context, next graphql.Resolver) (res any, err error) {
oc := graphql.GetFieldContext(ctx)
var span Span
if oc.IsResolver {
ctx, span = StartSpan(ctx, fmt.Sprintf("graphql:field:%s", oc.Field.Name))
}
defer func() {
if span != nil {
span.Finish()
}
}()
return next(ctx)
}
+100
View File
@@ -0,0 +1,100 @@
package monitoring
import (
"context"
"errors"
"fmt"
"net/http"
"os"
"time"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
"go.opentelemetry.io/otel/exporters/stdout/stdoutlog"
"go.opentelemetry.io/otel/log/global"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/log"
"go.opentelemetry.io/otel/sdk/metric"
"go.opentelemetry.io/otel/sdk/trace"
)
// SetupOTelSDK bootstraps the OpenTelemetry pipeline.
func SetupOTelSDK(ctx context.Context, enabled bool, serviceName, buildVersion, environment string) (func(context.Context) error, error) {
if os.Getenv("OTEL_RESOURCE_ATTRIBUTES") == "" {
if err := os.Setenv("OTEL_RESOURCE_ATTRIBUTES", fmt.Sprintf("service.name=%s,service.version=%s,service.environment=%s", serviceName, buildVersion, environment)); err != nil {
return func(context.Context) error {
return nil
}, err
}
}
var shutdownFuncs []func(context.Context) error
if !enabled {
return func(context.Context) error {
return nil
}, nil
}
shutdown := func(ctx context.Context) error {
var err error
for _, fn := range shutdownFuncs {
err = errors.Join(err, fn(ctx))
}
shutdownFuncs = nil
return err
}
// handleErr calls shutdown for cleanup and makes sure that all errors are returned.
handleErr := func(inErr error) (func(context.Context) error, error) {
return nil, errors.Join(inErr, shutdown(ctx))
}
// Set up the propagator.
prop := propagation.NewCompositeTextMapPropagator(
propagation.TraceContext{},
propagation.Baggage{},
)
otel.SetTextMapPropagator(prop)
traceExporter, err := otlptracehttp.New(ctx)
if err != nil {
return handleErr(err)
}
shutdownFuncs = append(shutdownFuncs, traceExporter.Shutdown)
tracerProvider := trace.NewTracerProvider(
trace.WithBatcher(traceExporter,
trace.WithBatchTimeout(5*time.Second)),
)
shutdownFuncs = append(shutdownFuncs, tracerProvider.Shutdown)
otel.SetTracerProvider(tracerProvider)
logExporter, err := stdoutlog.New()
if err != nil {
return handleErr(err)
}
processor := log.NewSimpleProcessor(logExporter)
logProvider := log.NewLoggerProvider(log.WithProcessor(processor))
global.SetLoggerProvider(logProvider)
shutdownFuncs = append(shutdownFuncs, logProvider.Shutdown)
exp, err := otlpmetrichttp.New(ctx)
if err != nil {
return handleErr(err)
}
meterProvider := metric.NewMeterProvider(metric.WithReader(metric.NewPeriodicReader(exp)))
shutdownFuncs = append(shutdownFuncs, meterProvider.Shutdown)
otel.SetMeterProvider(meterProvider)
return shutdown, err
}
func Handler(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ctx := otel.GetTextMapPropagator().Extract(r.Context(), propagation.HeaderCarrier(r.Header))
spanCtx, s := StartSpan(ctx, "http")
defer s.Finish()
h.ServeHTTP(w, r.WithContext(spanCtx))
})
}
+46
View File
@@ -0,0 +1,46 @@
package monitoring
import (
"context"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
)
type Span interface {
Context() context.Context
Finish()
}
type span struct {
otelSpan trace.Span
ctx context.Context
}
func (s *span) Finish() {
s.otelSpan.End()
}
func (s *span) Context() context.Context {
return s.ctx
}
func StartSpan(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, Span) {
ctx, otelSpan := otel.Tracer("").Start(ctx, name, opts...)
return ctx, &span{
otelSpan: otelSpan,
ctx: ctx,
}
}
type TraceHandlerFunc func(ctx context.Context, name string) (context.Context, func())
func (t TraceHandlerFunc) Trace(tx context.Context, name string) (context.Context, func()) {
return t(tx, name)
}
func Trace(ctx context.Context, name string) (context.Context, func()) {
ctx, s := StartSpan(ctx, name)
return ctx, s.Finish
}
+3 -3
View File
@@ -41,15 +41,15 @@ func (m *mergeDuplicatedFieldsVisitor) LeaveObjectTypeDefinition(ref int) {
}
oldFieldTypeNameBytes, err := m.document.PrintTypeBytes(oldTypeRef, nil)
if err != nil {
m.Walker.StopWithInternalErr(err)
m.StopWithInternalErr(err)
return
}
newFieldTypeNameBytes, err := m.document.PrintTypeBytes(newTypeRef, nil)
if err != nil {
m.Walker.StopWithInternalErr(err)
m.StopWithInternalErr(err)
return
}
m.Walker.StopWithExternalErr(operationreport.ErrDuplicateFieldsMustBeIdentical(
m.StopWithExternalErr(operationreport.ErrDuplicateFieldsMustBeIdentical(
fieldName, m.document.ObjectTypeDefinitionNameString(ref), string(oldFieldTypeNameBytes), string(newFieldTypeNameBytes),
))
return
+3 -3
View File
@@ -154,14 +154,14 @@ func (u unionSharedType) valueName(ref int) string {
type scalarSharedType struct{}
func (_ scalarSharedType) areValuesIdentical(_ []int) bool {
func (scalarSharedType) areValuesIdentical(_ []int) bool {
return true
}
func (_ scalarSharedType) valueRefs() []int {
func (scalarSharedType) valueRefs() []int {
return nil
}
func (_ scalarSharedType) valueName(_ int) string {
func (scalarSharedType) valueName(_ int) string {
return ""
}