Common Errors and How to Solve Them

StepZen CLI Errors

1. GraphQL Errors

Say you run stepzen start and you see:

Starting...... !

Your local schema has the following GraphQL errors:

Error: Unknown type "continentFilterInput".
Did you mean "ContinentFilterInput" or "LanguageFilterInput"?

If the StepZen CLI lets you know that you have GraphQL errors, it is helpful to check for a a typo in your GraphQL schema. GraphQL is case-sensitive, and here you can see that the error is helpfully picking up a type that should be spelled with a capital 'C' in order to be referenced properly.

Another GraphQL error you might run into looks like:

Your local schema has the following GraphQL errors:

Error: Cannot find file graphql/ap_spacex_land.graphql

This means StepZen cannot find the file by the path I'm providing in index.graphql. If I go into the file and correct the typo (a missing 'i' in graphql/ap_spacex_land.graphql), the error disappears:

schema @sdl(
  files: [
) {
  query: Query

GraphiQL Errors

1. HTTP Error

If you see:

  "errors": [
      "message": "Connector: HTTP Error: Bad Request",
      "locations": [
          "line": 2,
          "column": 3

This usually means there's something going on with your URL when you make the request. Is it formatted correctly?

2. Failed to Fetch

If you hit play and get this in response:

  "message": "Failed to fetch",
  "stack": "TypeError: Failed to fetch"

It often means that your endpoint's not currently up. Double-check to see that stepzen start is running.

3. Cannot query field on type

Say you're working with a SpaceX API and you make this request:

query MyQuery {
  capsules {

and get this response:

  "data": null,
  "errors": [
      "message": "Cannot query field \"limit\" on type \"Capsule\".",
      "locations": [
          "line": 4,
          "column": 5

That's because 'limit' is not defined on the capsules query inside the schema file:

    find: CapsulesFind
<!--     limit should be here -->
    offset: Int
    order: String
    sort: String
  ): [Capsule]
      endpoint: ""

If it's added back in, the error will disappear. So an error message letting you know you can't query a field on a type usually means you're referring to an field in my query that's unavailable for one reason or another-- a typo, or perhaps an unrefreshed page.

A Helpful Query to Add to Your Schema When Things Go Wrong

This schema uses to return information about your request:

type debug {
  args: JSON
  data: JSON
  files: JSON
  form: JSON
  headers: JSON
  json: JSON
  method: String
  url: String

type Query {
  debugger(id: String!): debug
    @rest(endpoint: "$id")

The 'id' is optional and provides a nice way to see what gets sent to the backend from StepZen, if you've got an id parameter you want to check on.

Basically, this endpoint returns back what is sent to that endpoint in a visible way. The response could help you see, for example, that the url is getting formatted in the way that you are assuming.

Cannot POST to GraphQL endpoint

When you create a development environment on your local machine using stepzen start, it returns the endpoint for your GraphQL API that looks like this: But it creates a local proxy for your endpoint as well that you can use to explore the API with GraphiQL. You can only use this endpoint for GraphiQL in the browser, for network requests you must use the actual GraphQL endpoint that was created. Because this local proxy is used for development of your endpoint only, by default, it makes requests using the Admin key. However, if it were a true proxy, that would possibly open up a security hole. To prevent that, the proxy will only accept requests coming from the stepzen start web app running on your browser.

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.