Compile-time error: "Argument field or value named 'order_by' can not be coerced"
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Usa la query e l’estratto dello schema come riproduzione minima; inizia tracciando il modo in cui il provider dei tipi GraphQL coerce i campi degli oggetti di input, in particolare i campi order_by e distinct_on con valori enum. Il lavoro è completato quando l’esempio compila e produce lo stesso risultato della query eseguita manualmente, con la copertura di questi casi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- F#
- Stelle
- 406
- Fork
- 74
- Merge medio
- 1g 8h
- PR unite (30g)
- 14
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fsprojects/FSharp.Data.GraphQL
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
fsprojects/FSharp.Data.GraphQL#573 · 1 reazione · 2 assegnatari ·
-
FR: Suave package Aperta
fsprojects/FSharp.Data.GraphQL#566 · 1 commento · 1 reazione · 2 assegnatari ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
Tutte le issue di fsprojects/FSharp.Data.GraphQL
Issue simili
-
bug priority:normal ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
OpenHands/extensions#626 · 1 commento ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
avniproject/avni-client#2135 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
use-agent-os/agent-os#3276 ·