From 9c162fab9db181eeaee416f15d10c5067132021c Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Thu, 26 May 2022 13:47:54 +0400 Subject: [PATCH] feat: expose fetchedStr and firstSeenStr --- src/graphql/schema/questions.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/graphql/schema/questions.ts b/src/graphql/schema/questions.ts index a0b676e..5e4b095 100644 --- a/src/graphql/schema/questions.ts +++ b/src/graphql/schema/questions.ts @@ -81,6 +81,11 @@ const QuestionShapeInterface = builder "Last timestamp at which metaforecast fetched the question", resolve: (parent) => parent.fetched, }), + fetchedStr: t.string({ + description: + "Last timestamp at which metaforecast fetched the question, in ISO 8601 format", + resolve: (parent) => parent.fetched.toISOString(), + }), qualityIndicators: t.field({ type: QualityIndicatorsObj, resolve: (parent) => @@ -127,6 +132,11 @@ export const QuestionObj = builder.prismaObject("Question", { description: "First timestamp at which metaforecast fetched the question", resolve: (parent) => parent.firstSeen, }), + firstSeenStr: t.string({ + description: + "First timestamp at which metaforecast fetched the question, in ISO 8601 format", + resolve: (parent) => parent.firstSeen.toISOString(), + }), history: t.relation("history", { query: () => ({ orderBy: {