StepZen lets you create a GraphQL API in minutes for all your data sources (SQL and NoSQL databases, REST and SOAP endpoints) and GraphQL APIs.
There are two ways to create your GraphQL API with StepZen:
Autogenerate GraphQL with the StepZen CLI Use the command-line interface (CLI)
stepzen importto specify a backend data source. StepZen introspects it and generates a GraphQL schema for you.
Write GraphQL Schemas Using GraphQL Directives Write your schema code in a
.graphqlGraphQL Schema Definition Language (SDL) file. Use one of the powerful GraphQL directive @rest, @dbquery, and @graphql to connect a backend. With a few lines of declarative code, you have a working schema.
Autogenerate GraphQL Schemas with StepZen CLI
You can auto-generate your schemas using StepZen's
stepzen import CLI command. This enables you to create a GraphQL schema for data sources including:
Any REST API, including REST interfaces on NoSQL databases:
stepzen import curl "YOUR_ENDPOINT" --header "Authentication: 123"
SQL databases – MySQL and PostgreSQL:
stepzen import mysql | postgresql
Any GraphQL API, including pre-built schemas available in StepZen GraphQL Studio:
stepzen import graphql
When you run the command, you are prompted to provide access information (e.g., host, headers, etc.) for your data source. StepZen introspects the backend and generates the schema.
Getting Started Wizard
See the Getting Started Wizard to get started quickly with your own data source or explore examples.
For more information on using the
stepzen import CLI commands see:
Write GraphQL Schemas Using GraphQL Directives
See the Write GraphQL Schemas for how to use GraphQL directives (@rest, @dbquery, @graphql) to write your GraphQL schema from scratch, or extend/customize what you create via
stepzen import for any backend.