Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Use Octokit.GraphQL instead of Octokit for the performance aspects

オープン
#13 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
csharp, github, graphql
領域
api, tooling

調査の方向性

NativeAOTDependencyHelper.Core/Sources/GitHubIssueSearchDataSource.cs の 63~66 行付近から始め、Octokit が GitHub の issue をどのようにクエリしているかを調べます。その呼び出しを提供された Octokit.GraphQL の例と比較し、issue 数の動作が同等のままであること、また結果のクエリが必要なデータだけを要求していることを確認します。

索引モデルが issue の本文から書いたものです。

説明

According to the GitHubIssueSearchDataSource class, it possibly queries hundreds of issues using Octokit.NET.

https://github.com/microsoft/NativeAOTDependencyHelper/blob/ee7c92ada9c4e7ef6c91e9f5807bf99d462952e0/NativeAOTDependencyHelper.Core/Sources/GitHubIssueSearchDataSource.cs#L66

However, GitHub API v3 (or Octokit or REST API) is not recommended where GitHub API v4 (or Octokit.GraphQL or GraphLQ API) is available since it queries the whole information at the API endpoint even if you don't request.

https://github.com/octokit/octokit.graphql.net

> dotnet add package Octokit.GraphQL

This GraphQL source does a query for a word AOT in the title of issues on CommunityToolkit/Windows.
Try run this in https://docs.github.com/en/graphql/overview/explorer

query
{
    search(
        query: "repo:CommunityToolkit/Windows is:issue in:title AOT",
        type: ISSUE,
        first: 1)
    {
        issueCount
    }
}
var connection = new Connection(new ProductHeaderValue("NativeAOTDependencyHelper"), "ACCESS_TOKEN");

var query = new Query()
    .Search("repo:microsoft/terminal is:issue in:title AOT", SearchType.Issue, first: 1)
    .Select(search => new
    {
        // No other data is queried or returned
        search.IssueCount,
    });

var response = await connection.Run(query);

var issueCount = response.IssueCount;

This is equivalent to:
https://github.com/search?q=repo%3ACommunityToolkit%2FWindows+is%3Aissue+in%3Atitle+AOT&type=issues
if you'd like to change the URL for users to visit:
https://github.com/microsoft/NativeAOTDependencyHelper/blob/ee7c92ada9c4e7ef6c91e9f5807bf99d462952e0/NativeAOTDependencyHelper.Core/Sources/GitHubIssueSearchDataSource.cs#L63

主要言語
C#
スター
45
フォーク
6
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/NativeAOTDependencyHelper のほかの issue

microsoft/NativeAOTDependencyHelper の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。