問題タブ [relay]
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 - 引数を持つフィールドに対して getOptimisticResponse が機能しない
以下は、グループから人を追加および削除するための私のコードです。
何らかの理由で、getOptimisticResponse
このミューテーションでは機能しません。
これは、フィールドに引数があるgroupId
ためでしょうか?isInGroup
node.js - 反応リレーの実装で未定義のプロパティ 'after' を読み取れません
私のnodejsアプリケーションで
ここに私のschema.jsファイルがあります
以下は私のdatabase.jsです
私はユーザーを取得しています
ユーザーと一緒にすべての投稿を取得したい
しかし、ターミナルで以下のエラーが発生しています
助けてください。前もって感謝します。
reactjs - Relayで失敗したミューテーションをキャッチして処理するには?
投稿を作成し、投稿リストの前に追加する Relay ミューテーションがあります。楽観的な更新は、ミューテーションが GraphQL サーバーに送信される前に、投稿のタイトルと URL をリストの先頭に追加します。私の問題は、突然変異が失敗するか完了できない場合、その楽観的な更新が後でリストから自動的に削除されることです。投稿を保存できないことを示す何らかのメッセージをユーザーに表示できるように、失敗したミューテーションをキャッチして処理する方法はありますか?
私のリレーの突然変異:
私のPostForm Reactコンポーネント:
reactjs - Relayがいつデータを取得し、propsを設定したかを判断する
this.props.relay.setVariablesを呼び出すと、Relay はこれらの新しい変数を指定してデータをフェッチし、その後、このデータを処理したいと考えています。ただし、これがいつ発生するかを正確に知る良い方法がわかりません。最初に setVariables で onReadyStateChange コールバックを使用しようとしましたが、これは props が設定された瞬間を捉えませんでした。
問題を解決するために最終的に行ったことは、componentWillRecieveProps で setTimeout を使用することでした。それまでに、小道具に新しいデータが取り込まれます。しかし、いつデータがフェッチされたかを判断するより良い方法はありますか?
node.js - Unable to fetch list in react relay
I am following schema same as mentioned here
I want to fetch all users so I updated my schema like this
And in database.js
I am getting results in /graphql as
and results as
but If I try to fetch this in view as
I am getting error Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.
Please tell me what I am missing . I tried a lot with and without @relay(plural: true). Also tried to update schema with arguments as
but I got error Cannot read property 'after' of undefined in implementing react-relay
Thanks in Advance.