-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
My Graphql Backend expects an operationName field to be sent, this aligns with the graphql-over-http draft spec
Current patch I am using
diff --git a/node_modules/react-relay-network-modern/es/RelayRequest.js b/node_modules/react-relay-network-modern/es/RelayRequest.js
index 2197cea..af6454a 100644
--- a/node_modules/react-relay-network-modern/es/RelayRequest.js
+++ b/node_modules/react-relay-network-modern/es/RelayRequest.js
@@ -46,6 +46,7 @@ export default class RelayRequest {
const formData = new _FormData_();
formData.append('id', this.getID());
formData.append('query', this.getQueryString());
+ formData.append('operationName', this.operation.name);
formData.append('variables', JSON.stringify(this.getVariables()));
Object.keys(uploadables).forEach(key => {
if (Object.prototype.hasOwnProperty.call(uploadables, key)) {
@@ -58,7 +59,8 @@ export default class RelayRequest {
return JSON.stringify({
id: this.getID(),
query: this.getQueryString(),
- variables: this.getVariables()
+ variables: this.getVariables(),
+ operationName: this.operation.name,
});
}
I suggest adding a variable on RelayRequest that will include this field when added
Ciaran
Yummy-sk and mununki
Metadata
Metadata
Assignees
Labels
No labels