Compile-time error: "Argument field or value named 'order_by' can not be coerced"
まだ誰も着手していません。
評価
調査の方向性
クエリとスキーマの抜粋を最小限の再現として使用し、まず GraphQL の型プロバイダーが入力オブジェクトのフィールド、特に enum 値を取る order_by と distinct_on フィールドをどのように強制変換するかを追跡してください。サンプルがコンパイルでき、手動で実行したクエリと同じ結果を生成し、これらのケースをカバーできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
I am using Hasura, and trying to run the following query:
let operation = MyProvider.Operation<"""query q {
test_table (order_by: {some_name: asc}) {
id
some_name
}
}""">
The query is valid and works if run manually, but I get a compile-time error with the F# Type Provider:
error FS3033: The type provider 'FSharp.Data.GraphQL.Client.GraphQLTypeProvider'
reported an error:
Argument field or value named 'order_by' can not be coerced.
It does not match a valid literal representation for the type.
Path: ["q"; "test_table"]
The relevant part of the schema:
{
"inputFields": null,
"kind": "ENUM",
"possibleTypes": null,
"interfaces": null,
"name": "order_by",
"enumValues": [
{
"isDeprecated": false,
"deprecationReason": null,
"name": "asc",
"description": "in the ascending order, nulls last"
},
...
],
"description": "column ordering options",
"fields": null
}
I've tried other parameters, such as offset, limit, where (this one works now: https://github.com/fsprojects/FSharp.Data.GraphQL/issues/263), and they work. distinct_on, however, results in the same compile time error. Could this have something to do with the _ in the name?
Repro steps
See description.
Expected behavior
The application compiles, the query returns the same result as when run manually.
Actual behavior
Compile-time error.
Known workarounds
None.
Related information
- Mac OS X
- Version 1.0.3
- .NET Core 3.1
- 主要言語
- F#
- スター
- 406
- フォーク
- 74
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 14
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fsprojects/FSharp.Data.GraphQL のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
fsprojects/FSharp.Data.GraphQL#573 · リアクション 1 件 · 担当者 2 名 ·
-
FR: Suave package オープン
fsprojects/FSharp.Data.GraphQL#566 · コメント 1 件 · リアクション 1 件 · 担当者 2 名 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
fsprojects/FSharp.Data.GraphQL の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mksglu/context-mode#1200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr impact:auth-provider issue-rating: 🌊 off-meta tidepool P2
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100