Stellate Product Updates logo
Back to Homepage Subscribe to Updates

Product Updates

See the latest new features, improvements, and product updates

Labels

  • All Posts
  • Fix
  • Announcement
  • Improvement
  • graph api
  • feature

Jump to Month

  • March 2023
  • January 2023
  • September 2022
  • August 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
Announcement
a year ago

[BETA] Local GraphCDN Development Environments

With version 1.3.0 of the GraphCDN CLI we released a new feature in beta that allows you to spin up a GraphCDN service for your local development environment.

Over the last couple of weeks, we noticed that it was quite hard to "just try" GraphCDN. You typically had to target a production instance of your GraphQL backend, or at least an instance exposed to the internet. With the new serve command you can point GraphCDN at a locally running GraphQL API and use it in your development environment.

To give this a try you'll need to have an account with GraphCDN. If you're new, please sign up first and then run graphcdn login to sign in to your account.

Next, you'll either need to pull your graphcdn.yml configuration (via the graphcdn pull command) or create a scaffolding configuration that looks like this:

# Skeleton graphcdn.yml
name: local-dev
app: local-dev
schema: http://graphql.local
originUrl: http://graphql.local

Also, make sure your development GraphQL server is up and running and accepting requests.

Once you're ready, you can create the development environment via the following command:

graphcdn serve --backend-port <port> --service <service name>

As service name use the same value provided in your graphcdn.yml file. In the example configuration above we'd use local-dev as the service name.

The serve command supports the following options

  • --backend-port, the port on your local host your GraphQL server is running on
  • --service, the name of the service if not specified in the graphcdn.yml file
  • --serve-port, the port you want to have the GraphCDN environment available on, defaults to the first free port greater than 3000 (Optional)
  • --watch, whether to watch the graphcdn.yml file for changes.
  • --path, the path your GraphQL API is available on, e.g. /graphql

This will make debugging your GraphCDN setups, as well as giving GraphCDN a try, a lot easier. Let us know what you think and if you have questions, please reach out to us via support@graphcdn.io.

Avatar of authorMarko Locher