diff --git a/graphql/queries/initiatives.graphql b/graphql/queries/initiatives.graphql index e3095af..20affb4 100644 --- a/graphql/queries/initiatives.graphql +++ b/graphql/queries/initiatives.graphql @@ -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 } diff --git a/graphql/queries/issues.graphql b/graphql/queries/issues.graphql index 2afbf99..0e74332 100644 --- a/graphql/queries/issues.graphql +++ b/graphql/queries/issues.graphql @@ -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. @@ -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 diff --git a/graphql/queries/labels.graphql b/graphql/queries/labels.graphql index 5759a84..1457bb1 100644 --- a/graphql/queries/labels.graphql +++ b/graphql/queries/labels.graphql @@ -61,3 +61,11 @@ query GetProjectLabels($first: Int = 50, $after: String) { } } } + +query FindProjectLabelsByName($name: String!) { + projectLabels(filter: { name: { eqIgnoreCase: $name } }, first: 1) { + nodes { + ...ProjectLabelFields + } + } +} diff --git a/graphql/queries/projects.graphql b/graphql/queries/projects.graphql index 9b3e8a5..1678c6e 100644 --- a/graphql/queries/projects.graphql +++ b/graphql/queries/projects.graphql @@ -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 @@ -166,3 +171,15 @@ query GetProjectStatuses { } } } + +query FindProjectsByName($name: String!, $includeArchived: Boolean = false) { + projects( + filter: { name: { eqIgnoreCase: $name } } + first: 2 + includeArchived: $includeArchived + ) { + nodes { + ...ProjectLookupFields + } + } +} diff --git a/graphql/queries/teams.graphql b/graphql/queries/teams.graphql index f941bd3..458c663 100644 --- a/graphql/queries/teams.graphql +++ b/graphql/queries/teams.graphql @@ -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 @@ -36,9 +43,6 @@ fragment TeamDetailFields on Team { key name } - issueEstimationType - issueEstimationExtended - issueEstimationAllowZero defaultIssueEstimate inheritIssueEstimation cyclesEnabled @@ -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 + } + } +}