Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix misleading isLead field name on Team #9413

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/client/components/ReviewRequestToJoinOrgModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ReviewRequestToJoinOrgModalViewerFragment = graphql`
teams {
id
name
isLead
isViewerLead
teamMembers(sortBy: "preferredName") {
userId
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const ManageTeamList = (props: Props) => {
const team = useFragment(
graphql`
fragment ManageTeamList_team on Team {
isLead
isViewerLead
isOrgAdmin
teamMembers(sortBy: "preferredName") {
id
Expand All @@ -36,7 +36,7 @@ const ManageTeamList = (props: Props) => {
`,
props.team
)
const {isLead: isViewerLead, isOrgAdmin: isViewerOrgAdmin, teamMembers} = team
const {isViewerLead, isOrgAdmin: isViewerOrgAdmin, teamMembers} = team
return (
<List>
{teamMembers.map((teamMember) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const query = graphql`
viewer {
team(teamId: $teamId) {
...ArchiveTeam_team
isLead
isViewerLead
id
name
tier
Expand Down
2 changes: 1 addition & 1 deletion packages/client/mutations/PromoteToTeamLeadMutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {PromoteToTeamLeadMutation as TPromoteToTeamLeadMutation} from '../__gene
graphql`
fragment PromoteToTeamLeadMutation_team on PromoteToTeamLeadPayload {
team {
isLead
isViewerLead
}
oldLeader {
...DashboardAvatar_teamMember
Expand Down
2 changes: 1 addition & 1 deletion packages/server/graphql/public/typeDefs/Team.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ type Team {
"""
true if the viewer is the team lead, else false
"""
isLead: Boolean!
isViewerLead: Boolean!

"""
true if the viewer is an admin for the team's org, else false
Expand Down
2 changes: 1 addition & 1 deletion packages/server/graphql/types/Team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const Team: GraphQLObjectType = new GraphQLObjectType<ITeam, GQLContext>({
return dataLoader.get('teamInvitationsByTeamId').load(teamId)
}
},
isLead: {
isViewerLead: {
type: new GraphQLNonNull(GraphQLBoolean),
description: 'true if the viewer is the team lead, else false',
resolve: async (
Expand Down
Loading