Using StepZen Templates

Predefined GraphQL schemas that help you get started quickly

StepZen templates are predefined graphql schemas that allow you not only to connect to StepZen, but also to set up your GraphQL types and queries in minutes.

Where to find them

You can browse our templates on our website, or head directly to our repo.

What's in our repository? Each folder holds a directory of GraphQL schema(s) that you can import to get a live connected StepZen endpoint up.

Walk Through An Example

Create and cd into your main project folder.

Make sure you've logged into StepZen.

Now, run stepzen import location.

StepZen will download and import these schemas into your system.

Try running stepzen start to see your deployed schema.

In the graphql query editor, try this query:

  location(ip: "8.8.8.8") {
    city
    country
    currency
  }
}

Hit the play button to get the response:

{
  "data": {
    "location": {
      "city": "Ashburn",
      "country": "US",
      "currency": "USD"
    }
  }
}

You can play around with importing any of the rest of our predefined schemas to add to your projects!

Your config.yaml

In the example above we didn't need to provide authentication to access the APIs, but what if we did?

First of all, if upon stepzen import you answered the questions presented to you like:

// Sample of questions to build your config.yaml
$ stepzen import cloudinary my-app
? What is the api_key for your cloudinary API? [input is hidden]
? What is the api_secret for your cloudinary API? [input is hidden]
? What is the cloud_name for your cloudinary API? [input is hidden]
Successfully imported 1 schemas from StepZen

Then, you'd have a config.yaml built out for you.

However, if you hit 'enter' to skip these questions, then you'd build your own.

For cloudinary, it would look like

  - configuration:
      name: cloudinary_config
      api_key: {{ api_key }}
      api_secret: {{ api_secret }}
      cloud_name: {{ cloud_name }}

If you get stuck, each folder for each schema repository has a readme that explains how to set it up. Or, feel free to contact us via our chatbox.

This site uses cookies: By using this website, you consent to our use of cookies in accordance with our Website Terms of Use and Cookie Policy.