federation
federation copied to clipboard
makeRequest method to modify url and method
#901
This PR enables us to modify the url and the http method for every request. The url change was easy but to enable the http method change I had to change the sendRequest method as it is always sending the body in the request and when you do it for a GET request it throws up a type error TypeError: Request with GET/HEAD method cannot have body here hence I had to change the implementation of sendRequest
I would recommend that we call the makeRequest method inside the sendRequest itself so that we can create the Request object dynamically and this can be modified.
@yawningphantom: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/
@trevor-scheer any update on this PR?