How to use Stellate for production traffic only
To start using Stellate to cache your queries for your users in production you have to update your GraphQL client's configuration.
Rather than sending requests to your origin directly, your GraphQL client should ping your app's <name>.stellate.sh
URL in production. For example, with Apollo Client this looks something like this:
const client = new ApolloClient({
uri: process.env.NODE_ENV === 'production'
? 'https://<name>.stellate.sh'
: 'http://localhost:3000/graphql',
})
Once you deploy that change to your users your API will be up and running on Stellate!
Updated 29 days ago
Did this page help you?