StepZen is now part of IBM. For the most recent product information and updates go to
https://www.ibm.com/products/stepzen

With Schemas Downloaded from GraphQL Studio

Get your GraphQL project up and running quickly by starting with the schema files you created in GraphQL Studio

You can create a GraphQL API using StepZen's GraphQL Studio and one of the following methods to obtain the API files:

Import the Files Using the CLI

You can import schemas from StepZen GraphQL Studio using the CLI.

Follow the steps below to import your schema files using the CLI:

  1. Select the API you want from from the complete list of prebuilt APIs at graphql.stepzen.com.

  2. Run the following command in your terminal to copy the published endpoint:

stepzen import graphql
  1. Enter your GraphQL API configuration when prompted:
  ? What is the GraphQL endpoint URL?
  ? Prefix to add to all generated type names (leave blank for none)
  ? Add an HTTP header, e.g. Header-Name: header value (leave blank for none)
  1. Run the following command to introspect your GraphQL schema and build your endpoint:
stepzen start

Your GraphQL API is now live on StepZen!

Download and Unzip and the Files

You can export your schema files (to a .zip file) to get a GraphQL project up and running quickly.

Follow the steps below to take a .zip file downloaded from GraphQL Studio, run your schemas on StepZen, and build on the GraphQL API:

  1. Unzip the files in your terminal:

    On Mac:

    unzip stepzen.zip

    You can then move the files into a directory that you name stepzen.

    On Windows:

    You can unzip the directory in Explorer by right-clicking and selecting Extract. Then navigate into the directory.

  2. Install the StepZen CLI from within the directory that contains your files:

    npm install -g stepzen

    and follow the steps outlined in our docs on installation.

  3. (Optional) Enter your keys. If you are working with APIs that require secret keys/IDs/tokens, enter them into your stepzen/config.yaml as shown here:

    configurationset:
      - configuration:
          name: api_config
          apiname_apiKey: "{APIKEY}"
    
  4. Run the StepZen CLI now that it's installed globally:

    stepzen start
  5. Name your endpoint when prompted:

    What would you like your endpoint to be called? (api/{{your-api-name}})

    You can accept the auto-suggestion or enter your own API name.

Now the same schemas that you selected in StepZen GraphQL Studio are ready to be inserted into your app via your own deployed endpoint: https://username.stepzen.net/api/{{your-api-name}}/__graphql.

You can also explore your GraphQL API endpoint using the Explorer on the StepZen Dashboard.


Tutorial: Local Currency by IP

The tutorial describes how to:

  • Select a two-API combination in GraphQL Studio (named Local Currency by IP).
  • Download it.
  • Explore the project files.
  • Use the StepZen CLI to build upon it.