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: {