-
Notifications
You must be signed in to change notification settings - Fork 9
/
schema.graphql
1723 lines (1580 loc) · 60.8 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"A date string with format `Y-m-d`, e.g. `2011-05-23`."
scalar Date @scalar(class: "Nuwave\\Lighthouse\\Schema\\Types\\Scalars\\Date")
"A datetime string with format `Y-m-d H:i:s`, e.g. `2018-05-23 13:43:32`."
scalar DateTime
@scalar(class: "Nuwave\\Lighthouse\\Schema\\Types\\Scalars\\DateTime")
"A RFC 5321 compliant email."
scalar Email @scalar(class: "MLL\\GraphQLScalars\\Email")
"A phone number string, accepts any string"
scalar PhoneNumber
"A human readable ID"
scalar KeyString
"Arbitrary data encoded in JavaScript Object Notation. See https://www.json.org."
scalar JSON @scalar(class: "MLL\\GraphQLScalars\\JSON")
"128 bit universally unique identifier (UUID)"
scalar UUID @scalar(class: "UUID")
type LocalizedString {
en: String
fr: String
}
type User {
id: ID!
sub: String
createdDate: DateTime @rename(attribute: "created_at")
updatedDate: DateTime @rename(attribute: "updated_at")
deletedDate: DateTime @rename(attribute: "deleted_at")
# Personal info
firstName: String @rename(attribute: "first_name")
lastName: String @rename(attribute: "last_name")
email: Email
telephone: PhoneNumber
preferredLang: Language @rename(attribute: "preferred_lang")
preferredLanguageForInterview: Language
@rename(attribute: "preferred_language_for_interview")
preferredLanguageForExam: Language
@rename(attribute: "preferred_language_for_exam")
currentProvince: ProvinceOrTerritory @rename(attribute: "current_province")
currentCity: String @rename(attribute: "current_city")
citizenship: CitizenshipStatus
armedForcesStatus: ArmedForcesStatus @rename(attribute: "armed_forces_status")
# Language
languageAbility: LanguageAbility
@rename(attribute: "language_ability")
@deprecated(
reason: "languageAbility is deprecated. Use lookingFor<Language> instead. Remove in #7661."
)
lookingForEnglish: Boolean @rename(attribute: "looking_for_english")
lookingForFrench: Boolean @rename(attribute: "looking_for_french")
lookingForBilingual: Boolean @rename(attribute: "looking_for_bilingual")
bilingualEvaluation: BilingualEvaluation
@rename(attribute: "bilingual_evaluation")
comprehensionLevel: EvaluatedLanguageAbility
@rename(attribute: "comprehension_level")
writtenLevel: EvaluatedLanguageAbility @rename(attribute: "written_level")
verbalLevel: EvaluatedLanguageAbility @rename(attribute: "verbal_level")
estimatedLanguageAbility: EstimatedLanguageAbility
@rename(attribute: "estimated_language_ability")
# Gov info
isGovEmployee: Boolean @rename(attribute: "is_gov_employee")
govEmployeeType: GovEmployeeType @rename(attribute: "gov_employee_type")
currentClassification: Classification @belongsTo # Users current classification
department: Department @belongsTo
hasPriorityEntitlement: Boolean @rename(attribute: "has_priority_entitlement")
priorityNumber: String @rename(attribute: "priority_number")
# Employment equity
isWoman: Boolean @rename(attribute: "is_woman")
hasDisability: Boolean @rename(attribute: "has_disability")
isIndigenous: Boolean
@rename(attribute: "is_indigenous")
@deprecated(
reason: "isIndigenous is deprecated. Use indigenousCommunities instead. Remove in #7662."
)
isVisibleMinority: Boolean @rename(attribute: "is_visible_minority")
indigenousCommunities: [IndigenousCommunity]
@rename(attribute: "indigenous_communities")
indigenousDeclarationSignature: String
@rename(attribute: "indigenous_declaration_signature")
# Applicant info
hasDiploma: Boolean
@rename(attribute: "has_diploma")
@deprecated(reason: "hasDiploma to be replaced")
locationPreferences: [WorkRegion] @rename(attribute: "location_preferences")
locationExemptions: String @rename(attribute: "location_exemptions")
acceptedOperationalRequirements: [OperationalRequirement]
@rename(attribute: "accepted_operational_requirements")
positionDuration: [PositionDuration] @rename(attribute: "position_duration")
# Pool info
poolCandidates: [PoolCandidate]
@hasMany(scopes: ["authorizedToView"])
@can(ability: "view", resolved: true) # PoolsCandidate objects associate the user with a pool
# Experiences
experiences: [Experience]
@with(relation: "awardExperiences")
@with(relation: "communityExperiences")
@with(relation: "educationExperiences")
@with(relation: "personalExperiences")
@with(relation: "workExperiences") # All experiences that a user owns
awardExperiences: [AwardExperience] @hasMany # Award experiences that a user owns
communityExperiences: [CommunityExperience] @hasMany # Community experiences that a user owns
educationExperiences: [EducationExperience] @hasMany # Education experiences that a user owns
personalExperiences: [PersonalExperience] @hasMany # Personal experiences that a user owns
workExperiences: [WorkExperience] @hasMany # Work experiences that a user owns
# Skill Library
userSkills(includeSkillIds: [UUID] @in(key: "skill_id")): [UserSkill] @hasMany
topTechnicalSkillsRanking: [UserSkill]
topBehaviouralSkillsRanking: [UserSkill]
improveTechnicalSkillsRanking: [UserSkill]
improveBehaviouralSkillsRanking: [UserSkill]
# Profile Status
isProfileComplete: Boolean
priorityWeight: Int @rename(attribute: "priority_weight")
# teams and roles
roleAssignments: [RoleAssignment!] @hasMany
# Notifications
unreadNotifications: [Notification!]
@rename(attribute: "unread_enriched_notifications")
notifications: [Notification!] @rename(attribute: "enriched_notifications")
}
interface Notification {
id: ID!
readAt: DateTime @rename(attribute: "read_at")
createdAt: DateTime @rename(attribute: "created_at")
updatedAt: DateTime @rename(attribute: "updated_at")
}
type PoolCandidateStatusChangedNotification implements Notification {
id: ID!
readAt: DateTime @rename(attribute: "read_at")
createdAt: DateTime @rename(attribute: "created_at")
updatedAt: DateTime @rename(attribute: "updated_at")
oldStatus: PoolCandidateStatus @rename(attribute: "old_status")
newStatus: PoolCandidateStatus @rename(attribute: "new_status")
poolId: ID @rename(attribute: "pool_id")
poolName: LocalizedString @rename(attribute: "pool_name")
}
type UserPublicProfile @model(class: "\\App\\Models\\User") {
id: ID!
email: Email
firstName: String @rename(attribute: "first_name")
lastName: String @rename(attribute: "last_name")
}
type ScreeningQuestion {
id: ID!
pool: Pool @belongsTo
question: LocalizedString
sortOrder: Int @rename(attribute: "sort_order")
screeningQuestionResponses: [ScreeningQuestionResponse] @hasMany
}
type Pool {
id: ID!
owner: UserPublicProfile @belongsTo(relation: "user")
team: Team @belongsTo @can(ability: "viewAny")
name: LocalizedString
classifications: [Classification] @belongsToMany
operationalRequirements: [OperationalRequirement]
@rename(attribute: "operational_requirements")
poolCandidates: [PoolCandidate]
@hasMany(relation: "publishedPoolCandidates", scopes: ["authorizedToView"])
@can(ability: "view", resolved: true)
keyTasks: LocalizedString @rename(attribute: "key_tasks")
yourImpact: LocalizedString @rename(attribute: "your_impact")
whatToExpect: LocalizedString @rename(attribute: "what_to_expect")
specialNote: LocalizedString @rename(attribute: "special_note")
isRemote: Boolean @rename(attribute: "is_remote")
location: LocalizedString @rename(attribute: "advertisement_location")
securityClearance: SecurityStatus @rename(attribute: "security_clearance")
language: PoolLanguage @rename(attribute: "advertisement_language")
status: PoolStatus @rename(attribute: "status")
essentialSkills: [Skill!] @belongsToMany
nonessentialSkills: [Skill!] @belongsToMany
stream: PoolStream
processNumber: String @rename(attribute: "process_number")
publishingGroup: PublishingGroup @rename(attribute: "publishing_group")
createdDate: DateTime @rename(attribute: "created_at")
updatedDate: DateTime @rename(attribute: "updated_at")
screeningQuestions: [ScreeningQuestion]
@hasMany
@orderBy(column: "sort_order", direction: ASC)
closingDate: DateTime @rename(attribute: "closing_date")
publishedAt: DateTime @rename(attribute: "published_at")
archivedAt: DateTime @rename(attribute: "archived_at")
isComplete: Boolean
assessmentSteps: [AssessmentStep]
@hasMany
@canOnParent(ability: "viewAssessments")
poolSkills: [PoolSkill] @hasMany @canOnParent(ability: "viewAssessments")
}
type ScreeningQuestionResponse {
id: ID!
answer: String
screeningQuestion: ScreeningQuestion @belongsTo
poolCandidate: PoolCandidate @belongsTo
}
type AssessmentStep {
id: ID!
pool: Pool @belongsTo
type: AssessmentStepType
sortOrder: Int @rename(attribute: "sort_order")
title: LocalizedString
poolSkills: [PoolSkill] @belongsToMany
}
type PoolSkill {
id: ID!
type: PoolSkillType
pool: Pool @belongsTo
skill: Skill @belongsTo
assessmentSteps: [AssessmentStep] @belongsToMany
}
type PoolCandidate {
id: ID!
pool: Pool! @belongsTo @can(ability: "view", resolved: true)
user: User! @belongsTo(relation: "user") @can(ability: "view", resolved: true)
# cmoIdentifier can be an arbitrary string used to relate this candidate to an external database.
cmoIdentifier: ID @rename(attribute: "cmo_identifier")
# Expiry date for this candidate being in the pool.
expiryDate: Date @rename(attribute: "expiry_date")
status: PoolCandidateStatus @rename(attribute: "pool_candidate_status")
statusWeight: Int @rename(attribute: "status_weight")
notes: String
archivedAt: DateTime @rename(attribute: "archived_at")
submittedAt: DateTime @rename(attribute: "submitted_at")
suspendedAt: DateTime @rename(attribute: "suspended_at")
deletedDate: DateTime @rename(attribute: "deleted_at")
profileSnapshot: JSON @rename(attribute: "profile_snapshot")
signature: String
submittedSteps: [ApplicationStep!] @rename(attribute: "submitted_steps")
screeningQuestionResponses: [ScreeningQuestionResponse] @hasMany
educationRequirementOption: EducationRequirementOption
@rename(attribute: "education_requirement_option") # associated experiences to fulfill this called educationRequirementExperiences
educationRequirementExperiences: [Experience] # collection of experiences associated with educationRequirementOption
@with(relation: "educationRequirementAwardExperiences")
@with(relation: "educationRequirementCommunityExperiences")
@with(relation: "educationRequirementEducationExperiences")
@with(relation: "educationRequirementPersonalExperiences")
@with(relation: "educationRequirementWorkExperiences")
}
type PoolCandidateWithSkillCount {
id: ID!
poolCandidate: PoolCandidate! @self
skillCount: Int @rename(attribute: "skill_count") # will always be null unless used with skillsAdditive or skillsIntersectional scope
}
type Classification {
id: ID!
name: LocalizedString
group: String!
level: Int!
minSalary: Int @rename(attribute: "min_salary")
maxSalary: Int @rename(attribute: "max_salary")
genericJobTitles: [GenericJobTitle] @belongsToMany
}
type GenericJobTitle {
id: ID!
key: GenericJobTitleKey!
name: LocalizedString
classification: Classification @belongsTo
}
type Department {
id: ID!
departmentNumber: Int! @rename(attribute: "department_number")
name: LocalizedString!
teams: [Team] @belongsToMany @can(ability: "viewAny")
}
type Team {
id: ID!
name: String! # represents a unique key for a team
displayName: LocalizedString @rename(attribute: "display_name")
description: LocalizedString
departments: [Department] @belongsToMany
contactEmail: Email @rename(attribute: "contact_email")
pools: [Pool] @hasMany @can(ability: "view", resolved: true)
roleAssignments: [RoleAssignment!]
@hasMany
@canOnParent(ability: "viewTeamMembers")
}
type Role {
id: ID!
name: String! # represents a unique key for a role
displayName: LocalizedString @rename(attribute: "display_name")
description: LocalizedString
isTeamBased: Boolean @rename(attribute: "is_team_based")
roleAssignments: [RoleAssignment!]
@hasMany
@can(ability: "viewAnyRoleAssignments", model: "Role")
}
# This model represents the polymorphic role_user table and allows querying the team relationship
type RoleAssignment {
id: ID!
role: Role @belongsTo
team: Team @belongsTo
user: UserPublicProfile @morphTo
}
# equity selections goes with the pool/applicant filters and not user model
type EquitySelections {
isWoman: Boolean @rename(attribute: "is_woman")
hasDisability: Boolean @rename(attribute: "has_disability")
isIndigenous: Boolean @rename(attribute: "is_indigenous")
isVisibleMinority: Boolean @rename(attribute: "is_visible_minority")
}
input EquitySelectionsInput {
isWoman: Boolean @rename(attribute: "is_woman")
hasDisability: Boolean @rename(attribute: "has_disability")
isVisibleMinority: Boolean @rename(attribute: "is_visible_minority")
isIndigenous: Boolean @rename(attribute: "is_indigenous")
}
type PoolCandidateFilter {
id: ID!
classifications: [Classification] @belongsToMany
hasDiploma: Boolean
@rename(attribute: "has_diploma")
@deprecated(reason: "hasDiploma to be replaced")
equity: EquitySelections
languageAbility: LanguageAbility @rename(attribute: "language_ability")
operationalRequirements: [OperationalRequirement]
@rename(attribute: "operational_requirements")
workRegions: [WorkRegion] @rename(attribute: "work_regions")
pools: [Pool] @belongsToMany @can(ability: "view", resolved: true)
}
# ApplicantFilter only includes the fields which Talent Seekers can use to search for candidates.
type ApplicantFilter {
id: ID!
hasDiploma: Boolean
@rename(attribute: "has_diploma")
@deprecated(reason: "hasDiploma to be replaced")
equity: EquitySelections
languageAbility: LanguageAbility @rename(attribute: "language_ability")
operationalRequirements: [OperationalRequirement]
@rename(attribute: "operational_requirements")
locationPreferences: [WorkRegion] @rename(attribute: "location_preferences")
positionDuration: [PositionDuration] @rename(attribute: "position_duration")
skills: [Skill] @belongsToMany
# request creation connects to qualifiedClassifications
qualifiedClassifications: [Classification] @belongsToMany # Filters applicants based on the classifications pools they've qualified in.
qualifiedStreams: [PoolStream] @rename(attribute: "qualified_streams") # Filters applicants based on the streams of the pools they've qualified in.
pools: [Pool] @belongsToMany @can(ability: "view", resolved: true)
}
type PoolCandidateSearchRequest {
id: ID!
fullName: String @rename(attribute: "full_name")
email: Email
department: Department @belongsTo
jobTitle: String @rename(attribute: "job_title")
additionalComments: String @rename(attribute: "additional_comments")
requestedDate: DateTime @rename(attribute: "created_at")
status: PoolCandidateSearchStatus @rename(attribute: "request_status")
statusChangedAt: DateTime @rename(attribute: "request_status_changed_at")
adminNotes: String @rename(attribute: "admin_notes")
poolCandidateFilter: PoolCandidateFilter @belongsTo
applicantFilter: ApplicantFilter @belongsTo
wasEmpty: Boolean @rename(attribute: "was_empty")
managerJobTitle: String @rename(attribute: "manager_job_title")
positionType: PoolCandidateSearchPositionType
@rename(attribute: "position_type")
}
type SkillFamily {
id: ID!
key: KeyString!
name: LocalizedString
description: LocalizedString
skills: [Skill!] @belongsToMany
}
type Skill {
id: ID!
key: KeyString!
name: LocalizedString!
description: LocalizedString
keywords: SkillKeywords
category: SkillCategory!
families: [SkillFamily!] @belongsToMany
# ExperienceSkillRecord is the pivot data and may only be queried when Skill is nested in an Experience (eg. experience->skill->experienceSkillRecord). Querying for it otherwise will just return null.
experienceSkillRecord: ExperienceSkillRecord
@rename(attribute: "experience_skill")
}
type UserSkill {
id: ID!
user: User! @belongsTo @can(ability: "view", resolved: true)
skill: Skill! @belongsTo
skillLevel: SkillLevel @rename(attribute: "skill_level")
whenSkillUsed: WhenSkillUsed @rename(attribute: "when_skill_used")
topSkillsRank: Int @rename(attribute: "top_skills_rank")
improveSkillsRank: Int @rename(attribute: "improve_skills_rank")
# Experiences
experiences: [Experience!]
@with(relation: "awardExperiences")
@with(relation: "communityExperiences")
@with(relation: "educationExperiences")
@with(relation: "personalExperiences")
@with(relation: "workExperiences") # All experiences that a user owns
awardExperiences: [AwardExperience!] @hasMany
communityExperiences: [CommunityExperience!] @hasMany
educationExperiences: [EducationExperience!] @hasMany
personalExperiences: [PersonalExperience!] @hasMany
workExperiences: [WorkExperience!] @hasMany
}
type SkillKeywords {
en: [String!]
fr: [String!]
}
interface Experience {
id: ID!
user: User! @belongsTo(relation: "user") @can(ability: "view", resolved: true)
details: String
skills: [Skill!] @morphToMany
# ExperienceSkillRecord is the pivot data and may only be queried when Experience is nested in a Skill (eg. skill->experiences->experienceSkillRecord). Querying for it otherwise will just return null.
experienceSkillRecord: ExperienceSkillRecord
@rename(attribute: "experience_skill")
deletedDate: DateTime @rename(attribute: "deleted_at")
}
type WorkExperience implements Experience {
id: ID!
user: User! @belongsTo(relation: "user") @can(ability: "view", resolved: true)
role: String
organization: String
division: String
startDate: Date @rename(attribute: "start_date")
endDate: Date @rename(attribute: "end_date")
details: String
skills: [Skill!] @morphToMany
# ExperienceSkillRecord is the pivot data and may only be queried when Experience is nested in a Skill (eg. skill->experiences->experienceSkillRecord). Querying for it otherwise will just return null.
experienceSkillRecord: ExperienceSkillRecord
@rename(attribute: "experience_skill")
deletedDate: DateTime @rename(attribute: "deleted_at")
}
type PersonalExperience implements Experience {
id: ID!
user: User! @belongsTo(relation: "user") @can(ability: "view", resolved: true)
title: String
description: String
startDate: Date @rename(attribute: "start_date")
endDate: Date @rename(attribute: "end_date")
details: String
skills: [Skill!] @morphToMany
# ExperienceSkillRecord is the pivot data and may only be queried when Experience is nested in a Skill (eg. skill->experiences->experienceSkillRecord). Querying for it otherwise will just return null.
experienceSkillRecord: ExperienceSkillRecord
@rename(attribute: "experience_skill")
deletedDate: DateTime @rename(attribute: "deleted_at")
}
type CommunityExperience implements Experience {
id: ID!
user: User! @belongsTo(relation: "user") @can(ability: "view", resolved: true)
title: String
organization: String
project: String
startDate: Date @rename(attribute: "start_date")
endDate: Date @rename(attribute: "end_date")
details: String
skills: [Skill!] @morphToMany
# ExperienceSkillRecord is the pivot data and must be queried through a nested mutation (eg. experience->skill->experienceSkillRecord) querying for it directly will just return null
experienceSkillRecord: ExperienceSkillRecord
@rename(attribute: "experience_skill")
deletedDate: DateTime @rename(attribute: "deleted_at")
}
type EducationExperience implements Experience {
id: ID!
user: User! @belongsTo(relation: "user") @can(ability: "view", resolved: true)
institution: String
areaOfStudy: String @rename(attribute: "area_of_study")
thesisTitle: String @rename(attribute: "thesis_title")
startDate: Date @rename(attribute: "start_date")
endDate: Date @rename(attribute: "end_date")
type: EducationType
status: EducationStatus
details: String
skills: [Skill!] @morphToMany
# ExperienceSkillRecord is the pivot data and may only be queried when Experience is nested in a Skill (eg. skill->experiences->experienceSkillRecord). Querying for it otherwise will just return null.
experienceSkillRecord: ExperienceSkillRecord
@rename(attribute: "experience_skill")
deletedDate: DateTime @rename(attribute: "deleted_at")
}
type AwardExperience implements Experience {
id: ID!
user: User! @belongsTo(relation: "user") @can(ability: "view", resolved: true)
title: String
issuedBy: String @rename(attribute: "issued_by")
awardedDate: Date @rename(attribute: "awarded_date")
awardedTo: AwardedTo @rename(attribute: "awarded_to")
awardedScope: AwardedScope @rename(attribute: "awarded_scope")
details: String
skills: [Skill!] @morphToMany
# ExperienceSkillRecord is the pivot data and may only be queried when Experience is nested in a Skill (eg. skill->experiences->experienceSkillRecord). Querying for it otherwise will just return null.
experienceSkillRecord: ExperienceSkillRecord
@rename(attribute: "experience_skill")
deletedDate: DateTime @rename(attribute: "deleted_at")
}
type ExperienceSkillRecord {
details: String
}
input ClassificationFilterInput {
group: String!
level: Int!
}
input KeyFilterInput {
key: KeyString!
}
input IdInput {
id: ID!
}
input UserPoolFilterInput {
poolId: ID!
expiryStatus: CandidateExpiryFilter = ACTIVE
statuses: [PoolCandidateStatus!]
suspendedStatus: CandidateSuspendedFilter = ACTIVE
}
input UserFilterInput {
applicantFilter: ApplicantFilterInput @spread
poolFilters: [UserPoolFilterInput] @scope(name: "poolFilters")
isProfileComplete: Boolean @scope
isGovEmployee: Boolean @scope
telephone: String @scope
email: String @scope
name: String @scope
generalSearch: String @scope
roles: [ID] @scope(name: "roleAssignments")
trashed: Trashed @trashed
}
# Changes to this input will require some manual updates to api/app/GraphQL/Queries/CountPoolCandidatesByPool.php since it doesn't use the directives for automatic resolution
input ApplicantFilterInput {
equity: EquitySelectionsInput @scope
hasDiploma: Boolean @scope @deprecated(reason: "hasDiploma to be replaced")
languageAbility: LanguageAbility @scope
locationPreferences: [WorkRegion] @scope
operationalRequirements: [OperationalRequirement] @scope
positionDuration: [PositionDuration] @scope
# This field is [IdInput] instead of [ID] so that the output of an ApplicantFilter query can be used directly.
pools: [IdInput] @scope(name: "availableInPools") @pluck(key: "id")
skills: [IdInput] @scope(name: "skillsAdditive") @pluck(key: "id") # main one to correspond with ApplicantFilter.php
skillsIntersectional: [IdInput] @scope @pluck(key: "id") # AND filtering skills as opposed to OR
qualifiedClassifications: [ClassificationFilterInput]
@scope(name: "qualifiedClassifications") # Filters applicants based on the classification of pools they are currently qualified and available in.
qualifiedStreams: [PoolStream] @scope(name: "qualifiedStreams") # Filters applicants based on the stream of pools they are currently qualified and available in.
}
input PoolCandidateSearchInput {
applicantFilter: ApplicantFilterInput @spread
email: String @scope
generalSearch: String @scope
name: String @scope
notes: String @scope
isGovEmployee: Boolean @scope
priorityWeight: [Int] @scope(name: "priorityWeight")
poolCandidateStatus: [PoolCandidateStatus]
@scope(name: "poolCandidateStatuses")
expiryStatus: CandidateExpiryFilter @scope(name: "expiryStatus")
suspendedStatus: CandidateSuspendedFilter @scope(name: "suspendedStatus")
publishingGroups: [PublishingGroup] @scope(name: "publishingGroups") # Filters applicants based on the publishing group of the pool
}
input PoolCandidateSearchRequestInput {
status: [PoolCandidateSearchStatus] @scope(name: "searchRequestStatus")
departments: [ID] @scope
classifications: [ID] @scope
streams: [PoolStream] @scope
fullName: String @scope
email: String @scope
id: ID @scope
jobTitle: String @scope
additionalComments: String @scope
adminNotes: String @scope
generalSearch: String @scope
}
type CandidateSearchPoolResult {
pool: Pool! @can(ability: "view", resolved: true)
candidateCount: Int! @rename(attribute: "candidate_count")
}
type Query {
me: User @auth
user(id: UUID! @eq): User
@find
@softDeletes
@guard
@can(ability: "view", query: true)
users: [User]!
@all
@softDeletes
@guard
@can(ability: "viewAny")
@deprecated(
reason: "users is deprecated. Use usersPaginated instead. Remove in #7660."
)
usersPaginated(
where: UserFilterInput
orderBy: [OrderByClause!] @orderBy
): [User]!
@orderBy(column: "created_at", direction: DESC)
@paginate(defaultCount: 10, maxCount: 1000, scopes: ["authorizedToView"])
@guard
@can(ability: "viewAny")
applicant(id: UUID! @eq): User
@find(model: "User")
@guard
@can(ability: "view", query: true, model: "User")
@deprecated(
reason: "applicant is deprecated. Use user instead. Remove in #7651."
)
applicants(includeIds: [ID]! @in(key: "id")): [User]!
@all(model: "User")
@guard
@can(ability: "viewAny", model: "User")
@deprecated(
reason: "applicants is deprecated. Use usersPaginated instead. Remove in #7652."
)
userPublicProfiles: [UserPublicProfile]!
@all
@guard
@can(ability: "viewBasicInfo", model: "User")
@deprecated(
reason: "We should avoid non-paginated queries when we know a query will return thousands of values. In this case, we must write an alternative first!"
)
# countApplicants returns the number of candidates matching its filters, and requires no special permissions.
countApplicants(where: ApplicantFilterInput): Int!
@count(model: "User", scopes: ["inITPublishingGroup"])
pool(id: UUID! @eq): Pool @find @can(ability: "view", query: true)
publishedPools(
closingAfter: DateTime @where(key: "closing_date", operator: ">")
publishingGroup: PublishingGroup
@where(key: "publishing_group", operator: "=")
): [Pool!]!
@all(scopes: ["wasPublished", "notArchived"])
@can(ability: "viewAnyPublished", model: "Pool")
poolByKey(key: String! @eq): Pool @find @can(ability: "view", query: true)
pools: [Pool]!
@all(scopes: ["authorizedToView", "notArchived"])
@can(ability: "view", resolved: true)
poolCandidate(id: UUID! @eq): PoolCandidate
@find
@guard
@can(ability: "view", query: true)
poolCandidates(includeIds: [ID] @in(key: "id")): [PoolCandidate]!
@all(scopes: ["notDraft"])
@guard
@can(ability: "view", resolved: true)
@deprecated(
reason: "poolCandidates is deprecated. Use poolCandidatesPaginated instead. Remove in #7656."
)
poolCandidatesPaginated(
where: PoolCandidateSearchInput
orderBy: _
@orderBy(
relations: [
{
relation: "user"
columns: [
"priority_weight"
"first_name"
"email"
"preferred_lang"
"preferred_language_for_interview"
"preferred_language_for_exam"
"current_city"
]
}
]
)
): [PoolCandidateWithSkillCount]!
@paginate(
defaultCount: 10
maxCount: 1000
scopes: ["notDraft", "withSkillCount", "authorizedToView"]
model: "App\\Models\\PoolCandidate"
)
@guard
@can(ability: "view", resolved: true, model: "App\\Models\\PoolCandidate")
# This query lives at api/app/GraphQL/Queries/CountPoolCandidatesByPool.php.
# Returns the number of candidates by filtering their parent applicant, grouped by pool.
countPoolCandidatesByPool(
where: ApplicantFilterInput
): [CandidateSearchPoolResult!]!
classification(id: UUID! @eq): Classification @find @can(ability: "view")
classifications: [Classification]! @all @can(ability: "viewAny")
department(id: UUID! @eq): Department @find @can(ability: "view")
departments: [Department]! @all @can(ability: "viewAny")
poolCandidateFilter(id: UUID! @eq): PoolCandidateFilter
@find
@guard
@can(ability: "viewAny", model: "PoolCandidateSearchRequest")
@deprecated(
reason: "poolCandidateFilter is deprecated. Use poolCandidateSearchRequest.poolCandidateFilter instead. Remove in #7657."
)
poolCandidateFilters: [PoolCandidateFilter]!
@all
@guard
@can(ability: "viewAny", model: "PoolCandidateSearchRequest")
@throttle(name: "graphql")
@deprecated(
reason: "poolCandidateFilters is deprecated. Use poolCandidateSearchRequest.poolCandidateFilter instead. Remove in #7658."
)
applicantFilter(id: ID! @eq): ApplicantFilter
@find
@guard
@can(ability: "viewAny", model: "PoolCandidateSearchRequest")
@deprecated(
reason: "applicantFilter is deprecated. Use poolCandidateSearchRequest.applicantFilter instead. Remove in #7653."
)
applicantFilters: [ApplicantFilter]!
@all
@guard
@can(ability: "viewAny", model: "PoolCandidateSearchRequest")
@throttle(name: "graphql")
@deprecated(
reason: "applicantFilters is deprecated. Use poolCandidateSearchRequest.applicantFilter instead. Remove in #7654."
)
poolCandidateSearchRequest(id: ID! @eq): PoolCandidateSearchRequest
@find
@guard
@can(ability: "view", query: true)
poolCandidateSearchRequests(limit: Int @limit): [PoolCandidateSearchRequest]!
@all
@guard
@can(ability: "viewAny")
@orderBy(column: "created_at", direction: DESC)
@deprecated(
reason: "poolCandidateSearchRequests is deprecated. Use poolCandidateSearchRequestsPaginated instead. Remove in #7659."
)
latestPoolCandidateSearchRequests(
limit: Int @limit
): [PoolCandidateSearchRequest]!
@all
@orderBy(column: "created_at", direction: DESC)
@guard
@can(ability: "viewAny")
@deprecated(
reason: "latestPoolCandidateSearchRequests is deprecated. Use poolCandidateSearchRequestsPaginated instead. Remove in #7655."
)
poolCandidateSearchRequestsPaginated(
where: PoolCandidateSearchRequestInput
orderBy: [OrderByClause!] @orderBy
): [PoolCandidateSearchRequest]!
@orderBy(column: "created_at", direction: DESC)
@paginate(defaultCount: 10, maxCount: 500)
@guard
@can(ability: "viewAny")
skillFamily(id: UUID! @eq): SkillFamily @find @can(ability: "view")
skillFamilies: [SkillFamily]! @all @can(ability: "viewAny")
skill(id: UUID! @eq): Skill @find @can(ability: "view")
skills: [Skill]! @all @can(ability: "viewAny")
genericJobTitle(id: UUID! @eq): GenericJobTitle @find @can(ability: "view")
genericJobTitles: [GenericJobTitle]! @all @can(ability: "viewAny")
team(id: UUID! @eq): Team @find @can(ability: "view", query: true)
teams: [Team]! @all @can(ability: "viewAny")
roles: [Role]! @all @can(ability: "viewAny")
}
input ClassificationBelongsTo {
connect: ID
disconnect: Boolean
}
input PoolsHasMany {
create: [CreatePoolInput]
}
"""
When creating a User, name is required.
"""
input CreateUserInput {
sub: String
@rules(
apply: ["sometimes", "unique:users,sub"]
messages: [{ rule: "unique", message: "CreateUserSubInUse" }]
)
# Personal info
firstName: String! @rename(attribute: "first_name")
lastName: String! @rename(attribute: "last_name")
email: Email
@lowerCase
@rules(
apply: ["sometimes", "nullable", "unique:users,email"]
messages: [{ rule: "unique", message: "CreateUserEmailInUse" }]
)
telephone: PhoneNumber
preferredLang: Language @rename(attribute: "preferred_lang")
preferredLanguageForInterview: Language
@rename(attribute: "preferred_language_for_interview")
preferredLanguageForExam: Language
@rename(attribute: "preferred_language_for_exam")
currentProvince: ProvinceOrTerritory @rename(attribute: "current_province")
currentCity: String @rename(attribute: "current_city")
citizenship: CitizenshipStatus
armedForcesStatus: ArmedForcesStatus @rename(attribute: "armed_forces_status")
# Language
lookingForEnglish: Boolean @rename(attribute: "looking_for_english")
lookingForFrench: Boolean @rename(attribute: "looking_for_french")
lookingForBilingual: Boolean @rename(attribute: "looking_for_bilingual")
bilingualEvaluation: BilingualEvaluation
@rename(attribute: "bilingual_evaluation")
comprehensionLevel: EvaluatedLanguageAbility
@rename(attribute: "comprehension_level")
writtenLevel: EvaluatedLanguageAbility @rename(attribute: "written_level")
verbalLevel: EvaluatedLanguageAbility @rename(attribute: "verbal_level")
estimatedLanguageAbility: EstimatedLanguageAbility
@rename(attribute: "estimated_language_ability")
# Gov info
isGovEmployee: Boolean @rename(attribute: "is_gov_employee")
govEmployeeType: GovEmployeeType @rename(attribute: "gov_employee_type")
currentClassification: ClassificationBelongsTo
department: DepartmentBelongsTo
hasPriorityEntitlement: Boolean @rename(attribute: "has_priority_entitlement")
priorityNumber: String @rename(attribute: "priority_number")
# Employment equity
isWoman: Boolean @rename(attribute: "is_woman")
hasDisability: Boolean @rename(attribute: "has_disability")
isVisibleMinority: Boolean @rename(attribute: "is_visible_minority")
indigenousCommunities: [IndigenousCommunity]
@rename(attribute: "indigenous_communities")
indigenousDeclarationSignature: String
@rename(attribute: "indigenous_declaration_signature")
# Applicant info
hasDiploma: Boolean
@rename(attribute: "has_diploma")
@deprecated(reason: "hasDiploma to be replaced")
locationPreferences: [WorkRegion] @rename(attribute: "location_preferences")
locationExemptions: String @rename(attribute: "location_exemptions")
acceptedOperationalRequirements: [OperationalRequirement]
@rename(attribute: "accepted_operational_requirements")
positionDuration: [PositionDuration] @rename(attribute: "position_duration")
# Experiences
workExperiences: WorkExperienceHasMany
personalExperiences: PersonalExperienceHasMany
communityExperiences: CommunityExperienceHasMany
educationExperiences: EducationExperienceHasMany
awardExperiences: AwardExperienceHasMany
}
"""
When updating a User, all fields are optional
"""
input UpdateUserAsAdminInput
@validator(class: "App\\GraphQL\\Validators\\UpdateUserInputValidator") {
id: ID
sub: String
# Personal info
email: Email @lowerCase
firstName: String @rename(attribute: "first_name")
lastName: String @rename(attribute: "last_name")
telephone: PhoneNumber
preferredLang: Language @rename(attribute: "preferred_lang")
preferredLanguageForInterview: Language
@rename(attribute: "preferred_language_for_interview")
preferredLanguageForExam: Language
@rename(attribute: "preferred_language_for_exam")
currentProvince: ProvinceOrTerritory @rename(attribute: "current_province")
currentCity: String @rename(attribute: "current_city")
citizenship: CitizenshipStatus
armedForcesStatus: ArmedForcesStatus @rename(attribute: "armed_forces_status")
# Language
lookingForEnglish: Boolean @rename(attribute: "looking_for_english")
lookingForFrench: Boolean @rename(attribute: "looking_for_french")
lookingForBilingual: Boolean @rename(attribute: "looking_for_bilingual")
bilingualEvaluation: BilingualEvaluation
@rename(attribute: "bilingual_evaluation")
comprehensionLevel: EvaluatedLanguageAbility
@rename(attribute: "comprehension_level")
writtenLevel: EvaluatedLanguageAbility @rename(attribute: "written_level")
verbalLevel: EvaluatedLanguageAbility @rename(attribute: "verbal_level")
estimatedLanguageAbility: EstimatedLanguageAbility
@rename(attribute: "estimated_language_ability")
# Gov info
isGovEmployee: Boolean @rename(attribute: "is_gov_employee")
govEmployeeType: GovEmployeeType @rename(attribute: "gov_employee_type")
currentClassification: ClassificationBelongsTo
department: DepartmentBelongsTo
hasPriorityEntitlement: Boolean @rename(attribute: "has_priority_entitlement")
priorityNumber: String @rename(attribute: "priority_number")
# Employment equity
isWoman: Boolean @rename(attribute: "is_woman")
hasDisability: Boolean @rename(attribute: "has_disability")
isVisibleMinority: Boolean @rename(attribute: "is_visible_minority")
indigenousCommunities: [IndigenousCommunity]
@rename(attribute: "indigenous_communities")
indigenousDeclarationSignature: String
@rename(attribute: "indigenous_declaration_signature")
# Applicant info
hasDiploma: Boolean
@rename(attribute: "has_diploma")
@deprecated(reason: "hasDiploma to be replaced")
locationPreferences: [WorkRegion] @rename(attribute: "location_preferences")
locationExemptions: String @rename(attribute: "location_exemptions")
acceptedOperationalRequirements: [OperationalRequirement]
@rename(attribute: "accepted_operational_requirements")
positionDuration: [PositionDuration] @rename(attribute: "position_duration")
# Experiences
workExperiences: WorkExperienceHasMany
personalExperiences: PersonalExperienceHasMany
communityExperiences: CommunityExperienceHasMany
educationExperiences: EducationExperienceHasMany
awardExperiences: AwardExperienceHasMany
roleAssignmentsInput: RoleAssignmentHasMany
}
input UpdateUserAsUserInput
@validator(class: "App\\GraphQL\\Validators\\UpdateUserInputValidator") {
id: ID
# Personal info
email: Email @lowerCase
firstName: String @rename(attribute: "first_name")
lastName: String @rename(attribute: "last_name")
telephone: PhoneNumber
preferredLang: Language @rename(attribute: "preferred_lang")
preferredLanguageForInterview: Language
@rename(attribute: "preferred_language_for_interview")
preferredLanguageForExam: Language
@rename(attribute: "preferred_language_for_exam")
currentProvince: ProvinceOrTerritory @rename(attribute: "current_province")
currentCity: String @rename(attribute: "current_city")
citizenship: CitizenshipStatus
armedForcesStatus: ArmedForcesStatus @rename(attribute: "armed_forces_status")
# Language
lookingForEnglish: Boolean @rename(attribute: "looking_for_english")
lookingForFrench: Boolean @rename(attribute: "looking_for_french")
lookingForBilingual: Boolean @rename(attribute: "looking_for_bilingual")
bilingualEvaluation: BilingualEvaluation
@rename(attribute: "bilingual_evaluation")
comprehensionLevel: EvaluatedLanguageAbility
@rename(attribute: "comprehension_level")
writtenLevel: EvaluatedLanguageAbility @rename(attribute: "written_level")
verbalLevel: EvaluatedLanguageAbility @rename(attribute: "verbal_level")
estimatedLanguageAbility: EstimatedLanguageAbility
@rename(attribute: "estimated_language_ability")
# Gov info
isGovEmployee: Boolean @rename(attribute: "is_gov_employee")
govEmployeeType: GovEmployeeType @rename(attribute: "gov_employee_type")
currentClassification: ClassificationBelongsTo
department: DepartmentBelongsTo
hasPriorityEntitlement: Boolean @rename(attribute: "has_priority_entitlement")
priorityNumber: String @rename(attribute: "priority_number")
# Employment equity
isWoman: Boolean @rename(attribute: "is_woman")
hasDisability: Boolean @rename(attribute: "has_disability")
isVisibleMinority: Boolean @rename(attribute: "is_visible_minority")
indigenousCommunities: [IndigenousCommunity]
@rename(attribute: "indigenous_communities")
indigenousDeclarationSignature: String
@rename(attribute: "indigenous_declaration_signature")
# Applicant info