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

Better detection for when items were scoped?

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
graphql, ruby
領域
api, authorization

調査の方向性

Start with lib/graphql/schema/field/scope_extension.rb at the linked lines 14-18, then examine how runtime metadata is handled. Define a more robust way to distinguish authorized, unchanged external-service lists from lists that were actually scoped; the work is done when this no longer requires a shallow copy and the behavior is covered by the relevant tests.

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

説明

Currently, this library checks for whether or not items were scoped by using object equality:

https://github.com/rmosolgo/graphql-ruby/blob/b0d289ebd3ce0f8131d5c04708ece69585d1fad8/lib/graphql/schema/field/scope_extension.rb#L14-L18

This works when scope_items really did something, but not if you want to skip authorization altogether. For example, if you've got a list of items from an external service, and you want to return them as-is, without scoping or authorization, you'd have to do this:

def self.scope_items(items, ctx)
  items.dup # Make a shallow copy so GraphQL-Ruby will know that we authorized this list
end 

I bet there's a more robust way to implement this check (and maybe to implement the runtime metadata, too). I'm going to consider it for 3.0.

主要言語
Ruby
スター
5.4k
フォーク
1.4k
平均マージ
1日 8時間
マージ済み PR(30日)
74

環境構築

はじめの一歩

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

rmosolgo/graphql-ruby のほかの issue

rmosolgo/graphql-ruby の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

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

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