StepZen Docs

How to Build, Deploy, and Run GraphQL APIs from REST, SOAP, SQL, NoSQL, and GraphQL Data Sources

There are two ways to create your GraphQL API in StepZen:

  • Specify the data source you want to GraphQL-ize on the command line (stepzen import ...) and let StepZen generate the schema for you, or
  • Write your schema using GraphQL directives (@rest, @dbquery, @graphql) - powerful declarative constructs that provide a simpler, more efficient way to build GraphQL.

The code you generate using a stepzen import command writes the schema including the @rest, @dbquery, and @graphql directives for you. Whether you build a graph or federate graphs, StepZen's declarative approach lets you create concise APIs with built-in performance, cost, and reliability optimizations.

image graph-of-graphs with directives

How to . . .Docs section
Convert Each Backend into a Graph. There are two ways to create your GraphQL API - specify the backend and let StepZen generate the GraphQL for you, or write your schema using declarative constructs. Either way, you can have your GraphQL endpoint created and deployed in minutes.
1. Generate your Schema using stepzen import CLI. The quickest way to get started. Using the stepzen import CLI, you specify an existing backend data source - StepZen introspects the endpoint and auto-generates a GraphQL schema for you.Quickstart: stepzen import
2. Write Schema Code using Declarative Constructs. Write your schema code in a GraphQL Schema Definition Language (SDL)file. Use one of the GraphQL directives, @rest, @dbquery, and @graphql to connect and configure backends; link types using @materializer. You can design a schema with interfaces to enable access to multiple backends. With a few lines of declarative code, you have a working schema.Write GraphQL Schemas: Custom Directives
Secure your Schema and Endpoint. Use Admin Keys, API Keys, JWTs, and Field Policies to secure access to your schemas, endpoints, and backends.Secure Schemas & Endpoints
GraphQL Federation: Combine subgraphs into a supergraph. Build subgraphs in StepZen, or some other library or tool, and federate them in StepZen. You can build subgraphs in StepZen, or proxy subgraphs not built in StepZen, and then easily enable them for Apollo Federation.GraphQL Federation
Troubleshooting & Testing Learn to troubleshoot, test, and measure the performace of your GraphQL API.Troubleshooting and Testing
ReferenceDocs section
CLI Reference. The StepZen CLI is the primary tool for creating, uploading, deploying and testing your StepZen API. It is available via npm: npm install -g stepzenStepZen CLI Reference
GraphQL Directives Reference. A schema defines your GraphQL APIs and incorporates annotations called directives to control how your schema is executed. GraphQL directives @rest, @dbquery, @graphql, @materializer, @sequence, etc. allow you to code your data connections, sequence queries, stitch schemas, and more - declaratively in StepZen.GraphQL Directives Reference
Connect Frontends. How to connect StepZen to frontends like Postman, JavaScript, and Node.js.Connect Frontends
Features Reference. Learn how to encode Form Data into a request or on an HTTP POST method. Explore built-in GraphQL Scalar Types, and custom StepZen Scalar Types. Learn how to use mock data to test your queries and schemas and how to create sequences of queries.Features Reference

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.