stash/gqlgen.yml

47 lines
1.3 KiB
YAML
Raw Normal View History

# Refer to https://gqlgen.com/config/ for detailed .gqlgen.yml documentation.
2019-02-09 12:30:49 +00:00
schema:
- "graphql/schema/types/*.graphql"
- "graphql/schema/*.graphql"
2019-02-09 12:30:49 +00:00
exec:
2019-02-14 23:42:52 +00:00
filename: pkg/models/generated_exec.go
2019-02-09 12:30:49 +00:00
model:
2019-02-14 23:42:52 +00:00
filename: pkg/models/generated_models.go
2019-02-09 12:30:49 +00:00
resolver:
2019-02-14 23:42:52 +00:00
filename: pkg/api/resolver.go
2019-02-09 12:30:49 +00:00
type: Resolver
struct_tag: gqlgen
models:
Support a minModTime input on metadata scans. (#1951) * Support a maxAge input on metadata scans. Extend the GraphQL world with a Duration scalar. It is parsed as a typical Go duration, i.e., "4h" is 4 hours. Alternatively, one can pass an integer which is interpreted as seconds. Extend Mutation.metadataScan(input: $input) to support a new optional value, maxAge. If set, the scanner will exit early if the file it is looking at has an mtime older than the cutOff point generated by now() - maxAge This speeds up scanning in the case where the user knows how old the changes on disk are, by exiting the scan early if that is the case. * Change maxAge into minModTime Introduce a `Timestamp` scalar, so we have a scalar we control. Let it accept three formats: * RFC3339Nano * @UNIX where UNIX is a unix-timestamp: seconds after 01-01-1970 * '<4h': a timestamp relative to the current server time This scalar parses to a time.Time. Use MinModTime in the scanner to filter out a large number of scan analyzes by exiting the scan operation early. * Heed the linter, perform errcheck * Rename test vars for consistency. * Code review: move minModTime into queuefiles * Remove the ability to input Unix timestamps Test failures on the CI-system explains why this is undesirable. It is not clear what timezone one is operating in when entering a unix timestamp. We could go with UTC, but it is so much easier to require an RFC3339 timestamp, which avoids this problem entirely. * Move the minModTime field into filters Create a new filter input object for metadata scans, and push the minModTime field in there. If we come up with new filters, they can be added to that input object rather than cluttering the main input object. * Use utils.ParseDateStringAsTime Replace time.Parse with utils.ParseDateStringAsTime While here, add some more test cases for that parser.
2021-11-26 00:48:31 +00:00
# Scalars
Timestamp:
model: github.com/stashapp/stash/pkg/models.Timestamp
# Objects
2019-02-09 12:30:49 +00:00
Gallery:
2019-02-14 23:42:52 +00:00
model: github.com/stashapp/stash/pkg/models.Gallery
Image:
model: github.com/stashapp/stash/pkg/models.Image
ImageFileType:
model: github.com/stashapp/stash/pkg/models.ImageFileType
2019-02-09 12:30:49 +00:00
Performer:
2019-02-14 23:42:52 +00:00
model: github.com/stashapp/stash/pkg/models.Performer
2019-02-09 12:30:49 +00:00
Scene:
2019-02-14 23:42:52 +00:00
model: github.com/stashapp/stash/pkg/models.Scene
2019-02-09 12:30:49 +00:00
SceneMarker:
2019-02-14 23:42:52 +00:00
model: github.com/stashapp/stash/pkg/models.SceneMarker
2019-02-09 12:30:49 +00:00
ScrapedItem:
2019-02-14 23:42:52 +00:00
model: github.com/stashapp/stash/pkg/models.ScrapedItem
2019-02-09 12:30:49 +00:00
Studio:
2019-02-14 23:42:52 +00:00
model: github.com/stashapp/stash/pkg/models.Studio
Movie:
model: github.com/stashapp/stash/pkg/models.Movie
2019-02-09 12:30:49 +00:00
Tag:
2019-02-14 23:42:52 +00:00
model: github.com/stashapp/stash/pkg/models.Tag
SceneFileType:
model: github.com/stashapp/stash/pkg/models.SceneFileType
SavedFilter:
model: github.com/stashapp/stash/pkg/models.SavedFilter
2020-10-24 03:31:39 +00:00
StashID:
model: github.com/stashapp/stash/pkg/models.StashID