when(dateField.getDate()).thenReturn(TIMESTAMP_NEW / 1000); when(container.getDate("date")).thenReturn(dateField);
return null; return dateList.getList().stream().map(item -> DateUtils.toISO8601(item.getDate(), 0)).collect(Collectors.toList()); case "node": NodeGraphFieldList nodeList = container.getNodeList(schema.getName());
public GraphQLFieldDefinition createDateDef(FieldSchema schema) { return newFieldDefinition().name(schema.getName()).description(schema.getLabel()).type(GraphQLString).dataFetcher(env -> { GraphFieldContainer container = env.getSource(); DateGraphField dateField = container.getDate(schema.getName()); if (dateField != null) { return DateUtils.toISO8601(dateField.getDate(), 0); } return null; }).build(); }