Load Local or Staging GraphQL APIs on Production Frontends using Replace Rule
As a backend developer, your work constantly focuses on enhancing and expanding GraphQL APIs. After making changes, it’s essential to verify them with the frontend. However, deploying the frontend locally is challenging due to its complexities and dependencies. Requestly's Replace Rule can save you significant time and effort in setting up your local frontend environment. Additionally, staging APIs can be utilized on the production front end for testing.
Follow the below steps to use the Replace rule.
- Create a new Replace Rule.
- Use your production API hostname & path as source conditions like —
company.com/api/graphql
- Under Redirect To, select the URL and enter the local or staging URL in the field below.
- Save and test the rule.