Skip to content
Open
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
13 changes: 2 additions & 11 deletions graphql/queries/initiatives.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,8 @@ query GetInitiativeUpdate($id: String!) {
}
}

query FindInitiativesByName($name: String!, $teamId: ID, $ownerId: ID) {
initiatives(
first: 20
filter: {
and: [
{ name: { eqIgnoreCase: $name } }
{ teams: { some: { id: { eq: $teamId } } } }
{ owner: { id: { eq: $ownerId } } }
]
}
) {
query FindInitiativesByName($filter: InitiativeFilter!) {
initiatives(first: 20, filter: $filter) {
nodes {
...InitiativeNameLookupFields
}
Expand Down
42 changes: 42 additions & 0 deletions graphql/queries/issues.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,23 @@ fragment CompleteIssueWithReactionsFields on Issue {
}
}

fragment WorkflowStateLookupFields on WorkflowState {
id
name
team {
id
key
name
}
}

fragment IssueEstimateContextFields on Issue {
id
team {
...TeamEstimateLookupFields
}
}

# Complete issue search fragment with all relationships
#
# Combines all issue fragments into a comprehensive field selection.
Expand Down Expand Up @@ -323,6 +340,31 @@ query GetIssueTeam($issueId: String!) {
}
}

query FindWorkflowStates($filter: WorkflowStateFilter!) {
workflowStates(filter: $filter, first: 10) {
nodes {
...WorkflowStateLookupFields
}
}
}

query GetIssueEstimateContextById($id: String!) {
issue(id: $id) {
...IssueEstimateContextFields
}
}

query GetIssueEstimateContextByIdentifier($teamKey: String!, $number: Float!) {
issues(
filter: { team: { key: { eq: $teamKey } }, number: { eq: $number } }
first: 1
) {
nodes {
...IssueEstimateContextFields
}
}
}

# Search issues with text search and all relationships in single query
#
# Provides full-text search across Linear issues with complete
Expand Down
8 changes: 8 additions & 0 deletions graphql/queries/labels.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,11 @@ query GetProjectLabels($first: Int = 50, $after: String) {
}
}
}

query FindProjectLabelsByName($name: String!) {
projectLabels(filter: { name: { eqIgnoreCase: $name } }, first: 1) {
nodes {
...ProjectLabelFields
}
}
}
17 changes: 17 additions & 0 deletions graphql/queries/projects.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ fragment ProjectDetailFields on Project {
}
}

fragment ProjectLookupFields on Project {
id
name
}

# List all projects in the workspace
#
# Fetches a paginated list of projects across all teams with enriched
Expand Down Expand Up @@ -166,3 +171,15 @@ query GetProjectStatuses {
}
}
}

query FindProjectsByName($name: String!, $includeArchived: Boolean = false) {
projects(
filter: { name: { eqIgnoreCase: $name } }
first: 2
includeArchived: $includeArchived
) {
nodes {
...ProjectLookupFields
}
}
}
36 changes: 32 additions & 4 deletions graphql/queries/teams.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,17 @@ fragment TeamFields on Team {
name
}

fragment TeamDetailFields on Team {
fragment TeamEstimateLookupFields on Team {
id
key
name
issueEstimationType
issueEstimationExtended
issueEstimationAllowZero
}

fragment TeamDetailFields on Team {
...TeamEstimateLookupFields
description
private
timezone
Expand All @@ -36,9 +43,6 @@ fragment TeamDetailFields on Team {
key
name
}
issueEstimationType
issueEstimationExtended
issueEstimationAllowZero
defaultIssueEstimate
inheritIssueEstimation
cyclesEnabled
Expand Down Expand Up @@ -78,3 +82,27 @@ query GetTeamById($id: String!) {
...TeamDetailFields
}
}

query FindTeamEstimateContextById($id: ID!) {
teams(filter: { id: { eq: $id } }, first: 1) {
nodes {
...TeamEstimateLookupFields
}
}
}

query FindTeamEstimateContextByKey($key: String!) {
teams(filter: { key: { eq: $key } }, first: 1) {
nodes {
...TeamEstimateLookupFields
}
}
}

query FindTeamEstimateContextByName($name: String!) {
teams(filter: { name: { eq: $name } }, first: 1) {
nodes {
...TeamEstimateLookupFields
}
}
}