At StepZen, we believe there's a lot of power in providing developers with a single, consolidated API that brings together all of their disparate backends. But we also want to make that power available to developers as quickly and easily as possible. That's why we've been focused on creating tools that can help make the process of getting started building your API in StepZen even easier. Today I wanted to share two new capabilities we just released - create-stepzen-app and stepzen start. The two features work together to simplify the process of building and deploying your GraphQL API on StepZen.

Let's see how this works!


create-stepzen-app is a new tool that generates starter code to help you get begin deploying, testing and customizing your first GraphQL API using StepZen. You can use create-stepzen-app via npx:

npx create-stepzen-app my-project

You'll be asked a series of questions (mostly just your account details, which are preset if you've already run stepzen login on the StepZen CLI). Finally, it will offer you the option to choose from pre-existing templates. running create-stepzen-app

For example, choosing hello-world sets up a simple StepZen API to get the weather from OpenWeatherMap using longitude and latitude.

interface WeatherReport {
    date: Date!
    latitude: Float!
    longitude: Float!
    temp: Float
    feelsLike: Float
    description: String
    units: String

type OpenWeatherMapReport implements WeatherReport {}

type Query {
    weatherReport (latitude: Float!, longitude: Float!): WeatherReport
    openWeatherMapReport (latitude: Float!, longitude: Float!): OpenWeatherMapReport
        @supplies (query: "weatherReport")
        @connector(type: "__openweathermap_weather_location_connector__", configuration: "owm_default")

If you change directory into hello-world, we can explore a new feature of the StepZen CLI.

stepzen start

We are continuously improving the developer experience while building, deploying and testing an API on StepZen. To that end, stepzen start eliminates the need to run multiple commands to upload schemas and configurations and then deploy them. It also eliminates the need to have something like GraphQL Playground installed to test queries against your new API. Instead, everything is taken care of by stepzen start and you can test via the embedded GraphiQL editor.

Let's see how this works. If you've generated a project using create-stepzen-app it has the default project structure that stepzen start assumes (don't worry if you don't as you can override the defaults, just run stepzen start --help for a list of options). For instance, running stepzen start api/hello-world, where api/hello-world are my folder/schma-name, from within the hello-world project will automatically upload the API and configuration, deploy it and then open a GraphiQL browser editor to test it.

running stepzen start

The GraphiQL editor that opens in a browser tab is already connected to my new API deployed on StepZen. This means I can immediately run queries against it for testing.

embedded GraphiQL

Even better - stepzen start now watches any changes I make to my files and then automatically uploads and deploys them, making the build/deploy/test workflow much faster and more convenient.

Where to Go From Here

If you're already a part of the StepZen private alpha, all you need to do is update the CLI to get accesss to stepzen start. Just run npm update -g stepzen and you're good to go! Nothing additional is required to use create-stepzen-app.

If you're not already part of the private alpha, you can request an invitation.

To learn more about how to use both create-stepzen-app and stepzen start, check the docs.