I have an API based on Apollo Server. I then wrote the front-end with React using isomorphic-fetch. This code would adapt the URI depending on whether the code was executed