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

Errors not populating correctly

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
graphql, ruby
領域
api, backend

調査の方向性

まず、レスポンスのエラーがどのように GraphQL::Client::Errors に正規化されるかを追跡し、次に、報告で言及されているエラーに対する AST チェックを調べます。issue に示されているレスポンスを再現し、返された GraphQL エラーによって errors オブジェクトが設定され、messages と details が空のままにならないことを確認します。

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

説明

Given this response

#<GraphQL::Client::Response:0x000071fb2142c000
 @data=#<#<Module:0x000071fb20ea5820>::Mutation addUser=nil>,
 @errors=#<GraphQL::Client::Errors @messages={} @details={}>,
 @extensions=nil,
 @full_response=
  {"connection" => ["close"],
   "server" => ["TwistedWeb/24.3.0"],
   "date" => ["Wed, 18 Jun 2025 12:45:29 GMT"],
   "content-type" => ["application/json"],
   "content-length" => ["338"]},
 @original_hash=
  {"data" => {"addUser" => nil},
   "errors" =>
    [{"message" => "The provided field is not unique and already exists in GUS.",
      "locations" => [{"line" => 2, "column" => 3}],
      "path" => ["addUser"],
      "errorType" => "FieldExistsError",
      "data" => nil,
      "errorInfo" => {"errorType" => "FieldExistsError", "field" => "userPrincipalName", "value" => "[email protected]"}}]}>

The errors object is empty even though there is an error returned. I tried stepping through I was able to get the errors object after being normalized which yielded

{"message" => "The provided field is not unique and already exists in GUS.",
 "locations" => [{"line" => 2, "column" => 3}],
 "path" => ["addUser"],
 "errorType" => "FieldExistsError",
 "data" => nil,
 "errorInfo" => {"errorType" => "FieldExistsError", "field" => "userPrincipalName", "value" => "[email protected]"},
 "normalizedPath" => ["data", "addUser"]}

I'm assuming it's part of the AST check for errors but I don't really get how it works or what's missing

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

環境構築

はじめの一歩

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

github-community-projects/graphql-client のほかの issue

github-community-projects/graphql-client の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

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

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