Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont send ids to server #153

Open
casperstr opened this issue Nov 18, 2022 · 0 comments
Open

Dont send ids to server #153

casperstr opened this issue Nov 18, 2022 · 0 comments

Comments

@casperstr
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

The graphql-over-http spec does not specify any id beeing sent over the wire.
Therefore this might fail on certain servers.

diff --git a/node_modules/react-relay-network-modern/lib/RelayRequest.js b/node_modules/react-relay-network-modern/lib/RelayRequest.js
index e36ec20..5a52da1 100644
--- a/node_modules/react-relay-network-modern/lib/RelayRequest.js
+++ b/node_modules/react-relay-network-modern/lib/RelayRequest.js
@@ -62,7 +62,7 @@ var RelayRequest = /*#__PURE__*/function () {
         }
 
         var formData = new _FormData_();
-        formData.append('id', this.getID());
+        formData.append('operationName', this.getID());
         formData.append('query', this.getQueryString());
         formData.append('variables', JSON.stringify(this.getVariables()));
         Object.keys(uploadables).forEach(function (key) {
@@ -74,7 +74,7 @@ var RelayRequest = /*#__PURE__*/function () {
       }
 
       return JSON.stringify({
-        id: this.getID(),
+        operationName: this.getID(),
         query: this.getQueryString(),
         variables: this.getVariables()
       });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant