Source code for ace.centralize.graphql.selections.note

"""
Predefined SelectionSets for Note and Task entities.

Based on the Note/Task GraphQL schema output types:
    NoteDetail, NoteMutationOutput, NoteType, NotePriority,
    TaskDetail, TaskResponsibleUserDetail, TaskResponsibleUserGroupDetail
"""

from ace.core.graphql import SelectionSet


[docs] class NoteTypeSelections: """Reusable selection sets for NoteType fields.""" STANDARD = SelectionSet( "id", "name", )
[docs] class NotePrioritySelections: """Reusable selection sets for NotePriority fields.""" STANDARD = SelectionSet( "id", "name", )
[docs] class NoteSelections: """Reusable selection sets for Note fields.""" MINIMAL = SelectionSet( "noteId", ) STANDARD = SelectionSet( "noteId", "description", "entityId", "entityTypeId", nested={ "noteType": NoteTypeSelections.STANDARD, "priority": NotePrioritySelections.STANDARD, } ) FULL = SelectionSet( "noteId", "description", "entityId", "entityTypeId", "creationDateTime", "creationUser", "updateDateTime", "updateUser", nested={ "noteType": NoteTypeSelections.STANDARD, "priority": NotePrioritySelections.STANDARD, } ) # Kept for backward compatibility WITH_TYPE_AND_PRIORITY = STANDARD
[docs] class TaskSelections: """Reusable selection sets for Task fields.""" MINIMAL = SelectionSet( "taskId", "title", ) STANDARD = SelectionSet( "taskId", "title", "note", "startDate", "dueDate", "reminderDate", "completedDate", "entityId", "entityTypeId", "includeFolderResponsible", "isHidden", "isPrivate", ) FULL = SelectionSet( "taskId", "title", "note", "startDate", "dueDate", "reminderDate", "completedDate", "entityId", "entityTypeId", "includeFolderResponsible", "isHidden", "isPrivate", "creationDateTime", "creationUserId", "creator", "deletionDateTimeUTC", nested={ "responsibleUsers": SelectionSet( "userId", "displayName", ), "responsibleUserGroups": SelectionSet( "userGroupId", "displayName", ), "privateUserGroups": SelectionSet( "userGroupId", "displayName", ), } )