feat(global-search): add filtering options by starred and bookmarked (#1336)

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
This commit is contained in:
LaurentiuNiculae
2023-04-27 18:11:13 +03:00
committed by GitHub
parent 635d07ae04
commit 3d8a4022bd
9 changed files with 254 additions and 2 deletions
@@ -1580,6 +1580,14 @@ input Filter {
Only return images or repositories with at least one signature
"""
HasToBeSigned: Boolean
"""
Only returns images or repositories that are bookmarked or not bookmarked
"""
IsBookmarked: Boolean
"""
Only returns images or repositories that are starred or not starred
"""
IsStarred: Boolean
}
"""
@@ -8750,7 +8758,7 @@ func (ec *executionContext) unmarshalInputFilter(ctx context.Context, obj interf
asMap[k] = v
}
fieldsInOrder := [...]string{"Os", "Arch", "HasToBeSigned"}
fieldsInOrder := [...]string{"Os", "Arch", "HasToBeSigned", "IsBookmarked", "IsStarred"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
@@ -8781,6 +8789,22 @@ func (ec *executionContext) unmarshalInputFilter(ctx context.Context, obj interf
if err != nil {
return it, err
}
case "IsBookmarked":
var err error
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("IsBookmarked"))
it.IsBookmarked, err = ec.unmarshalOBoolean2ᚖbool(ctx, v)
if err != nil {
return it, err
}
case "IsStarred":
var err error
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("IsStarred"))
it.IsStarred, err = ec.unmarshalOBoolean2ᚖbool(ctx, v)
if err != nil {
return it, err
}
}
}
@@ -55,6 +55,10 @@ type Filter struct {
Arch []*string `json:"Arch,omitempty"`
// Only return images or repositories with at least one signature
HasToBeSigned *bool `json:"HasToBeSigned,omitempty"`
// Only returns images or repositories that are bookmarked or not bookmarked
IsBookmarked *bool `json:"IsBookmarked,omitempty"`
// Only returns images or repositories that are starred or not starred
IsStarred *bool `json:"IsStarred,omitempty"`
}
// Search results, can contain images, repositories and layers