We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
My Graphql Backend expects an operationName field to be sent, this aligns with the graphql-over-http draft spec
operationName
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
The text was updated successfully, but these errors were encountered:
No branches or pull requests
My Graphql Backend expects an
operationName
field to be sent, this aligns with the graphql-over-http draft specCurrent patch I am using
I suggest adding a variable on RelayRequest that will include this field when added
Ciaran
The text was updated successfully, but these errors were encountered: