StepZen is now part of IBM. For the most recent product information and updates visit our
IBM product page.

Write GraphQL Schemas with Custom Directives

Create a GraphQL API for any backend in a few lines of code using declarative directives @rest, @dbquery, @graphql.

There are two ways in which you can connect to a backend:

  1. Let StepZen introspect the backend and create a GraphQL API for you. The API will reflect how the backend has exposed the data. This is done via the stepzen import CLI. See the Quickstart documentation.

  2. You start with an application view of the API, and then use StepZen's custom GraphQL directives (@rest, @dbquery, and @graphql) to connect and configure the backend.

Note: You can mix and match the steps -- get started quickly with introspection, and then extend and customize your API using the arguments in the directives.

This section provides information on how to use the GraphQL directives to connect a backend data sources. With a few lines of declarative code, you have a working schema.