From 7596d6f76919d3fe6d44c8378c081077fc67fd13 Mon Sep 17 00:00:00 2001 From: stormofice <58337328+stormofice@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:04:40 +0200 Subject: [PATCH] fix: Use timestamp instead of date for availability --- internal/graphql/gqlserver/generated.go | 9 +++++---- internal/graphql/schema/scalars.graphql | 2 +- internal/graphql/schema/types.graphql | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/internal/graphql/gqlserver/generated.go b/internal/graphql/gqlserver/generated.go index 9e72ba4..708e379 100644 --- a/internal/graphql/gqlserver/generated.go +++ b/internal/graphql/gqlserver/generated.go @@ -1505,7 +1505,8 @@ scalar Date scalar UUID # File Upload -scalar Upload`, BuiltIn: false}, +scalar Upload +`, BuiltIn: false}, {Name: "../schema/subscriptions.graphql", Input: `type Subscription { # Subscription fires when a review is created reviewCreated: Review @@ -1581,7 +1582,7 @@ type Occurrence { priceGuest: Int tags: [Tag!]! reviewData(filter: ReviewFilter): ReviewDataOccurrence! - notAvailableAfter: Date + notAvailableAfter: Timestamp } type ReviewDataOccurrence { @@ -5271,7 +5272,7 @@ func (ec *executionContext) _Occurrence_notAvailableAfter(ctx context.Context, f } res := resTmp.(*time.Time) fc.Result = res - return ec.marshalODate2ᚖtimeᚐTime(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖtimeᚐTime(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Occurrence_notAvailableAfter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -5281,7 +5282,7 @@ func (ec *executionContext) fieldContext_Occurrence_notAvailableAfter(ctx contex IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Date does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil diff --git a/internal/graphql/schema/scalars.graphql b/internal/graphql/schema/scalars.graphql index fddca20..d602319 100644 --- a/internal/graphql/schema/scalars.graphql +++ b/internal/graphql/schema/scalars.graphql @@ -9,4 +9,4 @@ scalar Date scalar UUID # File Upload -scalar Upload \ No newline at end of file +scalar Upload diff --git a/internal/graphql/schema/types.graphql b/internal/graphql/schema/types.graphql index 64c4cce..9c35c6d 100644 --- a/internal/graphql/schema/types.graphql +++ b/internal/graphql/schema/types.graphql @@ -66,7 +66,7 @@ type Occurrence { priceGuest: Int tags: [Tag!]! reviewData(filter: ReviewFilter): ReviewDataOccurrence! - notAvailableAfter: Date + notAvailableAfter: Timestamp } type ReviewDataOccurrence {