mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
* Add findFile and findFiles * Add parent folder and zip file fields to file graphql types * Add parent_folder, zip_file fields to Folder graphql type * Add format to ImageFile type * Add format filter fields to image/video file filters
23 lines
359 B
Go
23 lines
359 B
Go
package api
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/99designs/gqlgen/graphql"
|
|
)
|
|
|
|
type queryFields []string
|
|
|
|
func collectQueryFields(ctx context.Context) queryFields {
|
|
fields := graphql.CollectAllFields(ctx)
|
|
return queryFields(fields)
|
|
}
|
|
|
|
func (f queryFields) Has(field string) bool {
|
|
for _, v := range f {
|
|
if v == field {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|