Skip to content

Схема grapqhl#1

Open
Rupikz wants to merge 5 commits into
mainfrom
feature/init-graphql
Open

Схема grapqhl#1
Rupikz wants to merge 5 commits into
mainfrom
feature/init-graphql

Conversation

@Rupikz
Copy link
Copy Markdown
Member

@Rupikz Rupikz commented May 15, 2023

No description provided.

Comment thread schema.graphql Outdated
updateLesson(input: UpdateLessonInput!): Lesson!
removeLesson(id: ID!): Boolean!

createEducationSubject(input: CreateEducationSubjectInput!): Subject!
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EducationSubject

Comment thread schema.graphql
type LessonGroupByWeekDay {
weekDay: WeekDay!
lessons: [Lesson!]!
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У вас же расписание зависит от WeekDay и WeekType. Кажется тут группировка сломана.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, стремная группировка

Comment thread schema.graphql
timeStart: Time!
timeEnd: Time!
weekDay: WeekDay!
weekType: WeekType!
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

190-191 - довольно хрупкая хуйня, если в каком-то универе расписание не будет завязано на чётные - нечётные недели

В качестве альтернативы можно сделать ScheduleType - отдельный тип, который будет описывать правила составления расписания. Первым очевидно будет стандартный механизм, основанный на чётности-нечётности недели. Но можно будет добавить и другие варианты.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно наверное решить это новым типом недели "WeekType.REGULAR" - такие уроки будут проходить каждую неделю, независимо от чётности

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants