Skip to content

Commit

Permalink
[Debt] Remove deprecated 'users.pools' (#8251)
Browse files Browse the repository at this point in the history
* remove deprecated field

* remove user.pools field

* remove unused genericJobTitles
  • Loading branch information
vd1992 authored Oct 19, 2023
1 parent 24ca54e commit ba70347
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
7 changes: 0 additions & 7 deletions api/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,6 @@ type User {
topBehaviouralSkillsRanking: [UserSkill]
improveTechnicalSkillsRanking: [UserSkill]
improveBehaviouralSkillsRanking: [UserSkill]
# Pool Manager info
pools: [Pool]
@hasMany
@can(ability: "view", resolved: true)
@deprecated(
reason: "pools is deprecated. user.roles.team.pools instead. Remove in #7664."
) # Pools a user owns
# Profile Status
isProfileComplete: Boolean
priorityWeight: Int @rename(attribute: "priority_weight")
Expand Down
1 change: 0 additions & 1 deletion api/storage/app/lighthouse-schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ type User {
topBehaviouralSkillsRanking: [UserSkill]
improveTechnicalSkillsRanking: [UserSkill]
improveBehaviouralSkillsRanking: [UserSkill]
pools: [Pool] @deprecated(reason: "pools is deprecated. user.roles.team.pools instead. Remove in #7664.")
isProfileComplete: Boolean
priorityWeight: Int
roleAssignments: [RoleAssignment!]
Expand Down
9 changes: 0 additions & 9 deletions packages/fake-data/src/fakeUsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ import {
EstimatedLanguageAbility,
Classification,
OperationalRequirement,
Pool,
WorkRegion,
GovEmployeeType,
Department,
CitizenshipStatus,
ArmedForcesStatus,
GenericJobTitle,
PositionDuration,
IndigenousCommunity,
Maybe,
Expand All @@ -31,7 +29,6 @@ import {
} from "./fakeExperiences";
import fakeClassifications from "./fakeClassifications";
import fakeDepartments from "./fakeDepartments";
import fakeGenericJobTitles from "./fakeGenericJobTitles";
import { GeneratedPoolCandidate } from "./fakePoolCandidateTypes";

type GeneratedUser = User & {
Expand All @@ -51,7 +48,6 @@ type GeneratedUser = User & {
const generateUser = (
departments: Department[],
classifications: Classification[], // all classifications
genericJobTitles: GenericJobTitle[], // all generic job titles

awardExperiences: GeneratedAwardExperience[], // Experiences belonging to this user
communityExperiences: GeneratedCommunityExperience[], // Experiences belonging to this user
Expand All @@ -60,7 +56,6 @@ const generateUser = (
workExperiences: GeneratedWorkExperience[], // Experiences belonging to this user

poolCandidates: GeneratedPoolCandidate[] = [], // poolCandidates associating this user with a pool
pools: Pool[] = [], // pools owned by this user
): GeneratedUser => {
return {
__typename: "User",
Expand Down Expand Up @@ -173,16 +168,13 @@ const generateUser = (
educationExperiences,
personalExperiences,
workExperiences,

pools,
};
};

// Default generator will not include any experiences, poolCandidates or pools
const defaultGenerator = (numToGenerate = 20): GeneratedUser[] => {
const departments = fakeDepartments();
const classifications = fakeClassifications();
const genericJobTitles = fakeGenericJobTitles();

const awardExperiences: GeneratedAwardExperience[] = [];
const communityExperiences: GeneratedCommunityExperience[] = [];
Expand All @@ -195,7 +187,6 @@ const defaultGenerator = (numToGenerate = 20): GeneratedUser[] => {
generateUser(
departments,
classifications,
genericJobTitles,
awardExperiences,
communityExperiences,
educationExperiences,
Expand Down

0 comments on commit ba70347

Please sign in to comment.