問題タブ [faunadb]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
graphql - FaunaDB のオブジェクトのリストを変更する
GraphQL スキーマを FaunaDB にインポートしており、新しい質問を作成したい
そのために、私は axios を使用しており、GraphQL の突然変異を次のようにしています。
選択肢以外はすべて機能します。オブジェクトの配列を送信したいのですが、エラーが発生しました:
Variable '$choices' expected value of type '[ChoicesInput]!' but got: "[ { key: 'A', value: '`0 1 2` and `0 1 2`' }, { key: 'B', value: '`0 1 2` and `3 3 3`' }, { key: 'C', value: '`3 3 3` and `0 1 2`' } ]". Reason: '[0]' Expected 'ChoicesInput', found not an object. (line 2, column 86): mutation($title: String!, $explanation: String!, $snippet: String, $answer: String!, $choices: [ChoicesInput]!) { ^
オブジェクトの配列を送信できるようにするには、どうすればよいですか?