Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

InvalidNullError not showing up in GraphQL::Client::Response errors since Graphql-ruby 2.4.11

Đang mở
#65 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
graphql, ruby
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu bằng cách so sánh hành vi của GraphQL::Client::Response giữa graphql 2.4.10 và 2.4.11, sử dụng commit được liên kết cùng các ví dụ response trước/sau trong issue này. Truy vết cách InvalidNullError và thuộc tính errors của response được xử lý, sau đó xác định liệu hành vi của 2.4.11 có đúng như mong đợi hay không và giải thích nguyên nhân hoặc thay đổi cần thiết.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I'm trying to upgrade our version of graphql gem from 2.4.10 to 2.4.11, and this commit changes default InvalidNullError handling.
Because of that change, all of a sudden my response object doesn't have the errors populated within the errors attribute (see example).

Before:

#<GraphQL::Client::Response:0x0000000155d92280
 @data=#<#<Module:0x000000015ad35148>::Mutation labelCreate=nil>,
 @errors=
  #<GraphQL::Client::Errors @messages={"data"=>["Cannot return null for non-nullable field LabelCreatePayload.errors"]} @details={"data"=>[{"message"=>"Cannot return null for non-nullable field LabelCreatePayload.errors", "normalizedPath"=>["data"]}]}>,
 @extensions=nil,
 @full_response=nil,
 @original_hash=
  {:http_status=>"200",
   "errors"=>[{"message"=>"Cannot return null for non-nullable field LabelCreatePayload.errors"}],
   "data"=>{"labelCreate"=>nil}}>

Now:

=> #<GraphQL::Client::Response:0x0000000137d12670
 @data=#<#<Module:0x0000000140f316a0>::Mutation labelCreate=nil>,
 @errors=#<GraphQL::Client::Errors @messages={} @details={}>,
 @extensions=nil,
 @full_response=nil,
 @original_hash=
  {:http_status=>"200",
   "errors"=>[{"message"=>"Cannot return null for non-nullable field LabelCreatePayload.errors", "locations"=>[{"line"=>3, "column"=>5}], "path"=>["labelCreate", "errors"]}],
   "data"=>{"labelCreate"=>nil}}>

Is this normal? Could I get some help understanding why that may be happening?

Ngôn ngữ chính
Ruby
Star
78
Fork
228
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github-community-projects/graphql-client

Tất cả issue của github-community-projects/graphql-client

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.