Skip to content

Переписать время в схеме под базовый тип graphql DateTime #55

Description

@kataevandrey

В graphql уже есть базовый тип для работы со временем - https://the-guild.dev/graphql/scalars/docs/scalars/date-time

Нужно в схеме переписать все даты на scalar DateTime и проверить резолверы с тестами.

Пример:

scalar DateTime
scalar Date

type Book {
  title: String!
  publishedAt: DateTime!
  publicationDate: Date
}
@query.field("currentDateTime")
def resolve_current_datetime(*_):
    from datetime import datetime
    return datetime.now()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status
    Готово

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions