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

FSharp.Data.GraphQL.Client: GraphQL NuGet compatibility (DateTime and DateTimeOffset)

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

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu tại src/FSharp.Data.GraphQL.Client/BaseTypes.fs, khoảng dòng 350, nơi client xử lý các kiểu phản hồi GraphQL. Tái hiện lỗi bằng một schema package GraphQL sử dụng DateTimeOffsetGraphType và một truy vấn đọc thuộc tính DateTimeOffset; hoàn thành khi phản hồi được deserialize thành công đối với các giá trị DateTimeOffset và DateTime.

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

Mô tả

Description

Client type provider does not work for e.g. DateTimeOffset deserialization. It knows to infer CLR Type in compile time but fails on runtime deserialization. I've checked the code and there is explicit handling of Date type but not DateTimeOffset nor DateTime types. https://github.com/fsprojects/FSharp.Data.GraphQL/blob/dev/src/FSharp.Data.GraphQL.Client/BaseTypes.fs#L350

Repro steps

Use GraphQL package to expose GraphQL server. Make type with DateTimeOffsetGraphType. Try to execute query which reads DateTimeOffset property.

Expected behavior

Should deserialize response successfully.

Actual behavior

Response deserialization fails with A string type was received in the query response item, but the matching schema field is not a string based type.

Known workarounds

Do not use DateTimeOffset in the schema.

Related information

.NET Core 2.2.401

Ngôn ngữ chính
F#
Star
406
Fork
74
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
14

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 fsprojects/FSharp.Data.GraphQL

Tất cả issue của fsprojects/FSharp.Data.GraphQL

Issue tương tự

Thêm issue về Backend & API Design

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.