async def _generate_project_entities(
        self, client: httpx.AsyncClient
    ) -> AsyncGenerator[LinearProjectEntity, None]:
        """Generate entities for all projects in the workspace.

        Args:
            client: HTTP client to use for requests

        Yields:
            Project entities
        """
        # Define query template with pagination placeholder
        query_template = """
        {{
          projects({pagination}) {{
            nodes {{
              id
              name
              slugId
              description
              priority
              startDate
              targetDate
              state
              createdAt
              updatedAt
              completedAt
              startedAt
              progress
              teams {{
                nodes {{
                  id
                  name
                }}
              }}
              lead {{
                name
              }}
            }}
            pageInfo {{
              hasNextPage
              endCursor
            }}
          }}
        }}
        """

        # Define processor function for project nodes
        async def process_project(project):
            project_id = project.get("id")
            project_name = project.get("name")

            logger.info(f"Processing project: {project_name}")

            # Extract team data
            team_ids = []
            team_names = []
            teams = project.get("teams", {}).get("nodes", [])

            for team in teams:
                team_ids.append(team.get("id"))
                team_names.append(team.get("name"))

            # Build breadcrumbs list
            breadcrumbs = []

            # Add team breadcrumbs if available
            for i, team_id in enumerate(team_ids):
                team_name = team_names[i]
                team_breadcrumb = Breadcrumb(entity_id=team_id, name=team_name, type="team")
                breadcrumbs.append(team_breadcrumb)

            # Create project URL
            project_url = f"https://linear.app/project/{project.get('slugId')}"

            # Create and yield LinearProjectEntity
            yield LinearProjectEntity(
                entity_id=project_id,
                name=project.get("name", ""),
                breadcrumbs=breadcrumbs,
                url=project_url,
                # LinearProjectEntity specific fields
                slug_id=project.get("slugId"),
                description=project.get("description"),
                priority=project.get("priority"),
                state=project.get("state"),
                team_ids=team_ids if team_ids else None,
                team_names=team_names if team_names else None,
                created_at=project.get("createdAt"),
                updated_at=project.get("updatedAt"),
                completed_at=project.get("completedAt"),
                started_at=project.get("startedAt"),
                target_date=project.get("targetDate"),
                start_date=project.get("startDate"),
                progress=project.get("progress"),
                lead=project.get("lead", {}).get("name") if project.get("lead") else None,
            )

        # Use the paginated query helper
        try:
            async for entity in self._paginated_query(
                client, query_template, process_project, entity_type="projects"
            ):
                yield entity
        except Exception as e:
            logger.error(f"Error in project entity generation: {str(e)}")
Generate entities for all projects in the workspace.

        Args:
            client: HTTP client to use for requests

        Yields:
            Project entities
        
backend/airweave/platform/sources/linear.py