---
# System prepended metadata

title: Competency Groups

---

# Competency Groups

> query(`searchCompetencyGroups`) {
    limit: number;
    organizationId: string;
    page: number;
    searchTerm?: string;
} => Pagination<CompetencyGroupWithChildrenResponse[]> (with competencies attr)

> mutation(`createCompetencyGroup`) {
    defaultLocaleCode: Scalars['String'];
  definition: Scalars['String'];
  localeCodes: Array<Scalars['String']>;
  name: Scalars['String'];
  organizationId: Scalars['String'];
} => CompetencyGroupWithChildrenResponse

> mutation(`updateCompetencyGroup`) {
  _id: Scalars['String'];
  defaultLocaleCode: Scalars['String'];
  definition: Scalars['String'];
  localeCodes: Array<Scalars['String']>;
  name: Scalars['String'];
  organizationId: Scalars['String'];    
} => CompetencyGroupResponse (it's without children just name and definition)
    
> mutation(`trashCompetencyGroup`) {
    organizationId: string,
    competencyGroupId: string    
} => {message, success}
    
## Competency Group

> query(`competencyGroup`) {
    $organizationId: string,
    $competencyGroupId: string    
} => CompetencyGroupWithChildrenResponse (competencies)
    
### Competency

> query(`competencies`) {
     organizationId: string,
    competencyGroupId: string,
    args: {localeCode: string[]}    
} => CompetencyWithItemsResponse[]
  
    ***** start now all crud operation ***** 
> mutation(`createCompetency`) {
    organizationId: string,
    competencyGroupId: string    
} => CompetencyResponse
    
> mutation(`updateCompetencyLocale`) {
    organizationId: string,
    competencyGroupId: string,
    localeCodes: string[],
    input: fromTypes.UpdateCompetencyLocaleInput    
} => CompetencyResponse (update name and definition for any langCode) ---- used twice ----
    
> mutation(`deleteCompetency`) {
    _id: string,
    organizationId: string    
} => {message, success}
    
#### Competency Item

> mutation(`updateCompetencyItemOrder`) {
    organizationId: string,
    competencyGroupId: string,
    input: {_id, competencyId}    
} => CompetencyItemResponse
    
> mutation(`updateCompetencyItem`) {
    organizationId: string,
    competencyGroupId: string,
    input: UpdateCompetencyItemInput (questionTitle, ...etc),
    withLocaleCodes: string[]    
} => CompetencyItemResponse 
    
##### Competency sub item
    
>mutation(`updateCompetencyItemResponseLogic`) {
  competencyGroupId: string;
  input: UpdateCompetencyItemResponseLogicSubItemInput; (questionTitle and so on)
  organizationId: string;
  withLocaleCodes: string[];    
} => CompetencySubItemResponse