Add excluded field to cookie pattern GraphQL schema
Expose excluded on the CookiePattern type and accept it as an optional input on UpdateCookiePatternInput so the console can toggle pattern exclusion inline. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -801,6 +801,7 @@ func (r *mutationResolver) UpdateCookiePattern(ctx context.Context, input types.
|
||||
DisplayName: input.DisplayName,
|
||||
MaxAgeSeconds: gqlutils.UnwrapOmittable(input.MaxAgeSeconds),
|
||||
Description: input.Description,
|
||||
Excluded: input.Excluded,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
@@ -203,6 +203,7 @@ type CookiePattern implements Node {
|
||||
maxAgeSeconds: Int
|
||||
description: String!
|
||||
source: CookieSource!
|
||||
excluded: Boolean!
|
||||
cookieCount: Int! @goField(forceResolver: true)
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
@@ -443,6 +444,7 @@ input UpdateCookiePatternInput {
|
||||
displayName: String
|
||||
maxAgeSeconds: Int @goField(omittable: true)
|
||||
description: String
|
||||
excluded: Boolean
|
||||
}
|
||||
|
||||
input DeleteCookiePatternInput {
|
||||
|
||||
@@ -75,6 +75,7 @@ func NewCookiePattern(cp *coredata.CookiePattern) *CookiePattern {
|
||||
MaxAgeSeconds: cp.MaxAgeSeconds,
|
||||
Description: cp.Description,
|
||||
Source: cp.Source,
|
||||
Excluded: cp.Excluded,
|
||||
CreatedAt: cp.CreatedAt,
|
||||
UpdatedAt: cp.UpdatedAt,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user