# gqlgen configuration. Run `go generate ./graph` from the repository root, or
# `gqlgen` from this directory; every path below is relative to this file.
#
# The layout mirrors git.sr.ht's api/: the schema beside the resolvers, the
# executable schema in its own package so nothing but the server touches it, and
# hand-written models autobound by name.
schema:
- schema.graphqls
exec:
filename: api/generated.go
package: api
model:
filename: model/models_gen.go
package: model
resolver:
layout: follow-schema
dir: .
package: graph
# Federation into api.sr.ht is a config line on the gateway, not a build-time
# decision here: `api-origin=` points it at our own /query. It is deliberately
# left off — nothing about this schema depends on the gateway existing.
autobind:
- "sourcecraft.dev/bigbes/sr-ht-spec/graph/model"
# Cursor is core-go's pagination cursor; binding it here lets the hand-written
# webhook models' QueryWithCursor share the type gqlgen threads through the
# generated resolver signatures.
models:
Cursor:
model:
- sourcecraft.dev/bigbes/sr-ht-core/model.Cursor
omit_getters: true