From 48b90b43e1bdb05e121e84445cd5a84a4b54ce9d Mon Sep 17 00:00:00 2001 From: Barney Boisvert Date: Mon, 10 Jun 2024 08:52:49 -0700 Subject: [PATCH] don't offer dates for recipe history, only timestamps --- .../graphql/resolvers/PlannedRecipeHistoryResolver.java | 9 --------- src/main/resources/graphqls/library.graphqls | 2 -- 2 files changed, 11 deletions(-) diff --git a/src/main/java/com/brennaswitzer/cookbook/graphql/resolvers/PlannedRecipeHistoryResolver.java b/src/main/java/com/brennaswitzer/cookbook/graphql/resolvers/PlannedRecipeHistoryResolver.java index 26f2703c..0dd56050 100644 --- a/src/main/java/com/brennaswitzer/cookbook/graphql/resolvers/PlannedRecipeHistoryResolver.java +++ b/src/main/java/com/brennaswitzer/cookbook/graphql/resolvers/PlannedRecipeHistoryResolver.java @@ -4,26 +4,17 @@ import graphql.kickstart.tools.GraphQLResolver; import org.springframework.stereotype.Component; -import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.ZoneOffset; @Component public class PlannedRecipeHistoryResolver implements GraphQLResolver { - public LocalDate plannedDate(PlannedRecipeHistory history) { - return plannedAt(history).toLocalDate(); - } - public OffsetDateTime plannedAt(PlannedRecipeHistory history) { return history.getPlannedAt() .atOffset(ZoneOffset.UTC); } - public LocalDate doneDate(PlannedRecipeHistory history) { - return doneAt(history).toLocalDate(); - } - public OffsetDateTime doneAt(PlannedRecipeHistory history) { return history.getDoneAt() .atOffset(ZoneOffset.UTC); diff --git a/src/main/resources/graphqls/library.graphqls b/src/main/resources/graphqls/library.graphqls index 4297e9b6..753f9d39 100644 --- a/src/main/resources/graphqls/library.graphqls +++ b/src/main/resources/graphqls/library.graphqls @@ -197,9 +197,7 @@ type PlannedRecipeHistory implements Node { owner: User! status: PlanItemStatus! plannedAt: DateTime! - plannedDate: Date! doneAt: DateTime! - doneDate: Date! rating: Rating ratingInt: PositiveInt notes: String