Troubleshooting · Developer docs

Troubleshooting

Grouped by symptom, never by module, because the person with the problem does not know which module has it. One hundred questions across ten pages, each answered with the causes in the order they usually turn out to be true.

Answer API requests

GraphQL answers 500 "Currently, only Query GraphQL requests are supported by this API"

The GraphQL endpoint reads; it does not write: send only query in the body, with every value straight in the query text rather than in variables, and write through the REST routes instead.

Begin the body text with the word query, and name each list by its type, Page, BlogPost, MenuElement. Separate fields with commas or line breaks, never spaces. Pass first to limit a list, and send the request as POST.

HTTP The one shape it accepts, with a real answer from this documentation site
POST /cdna-api/graphql
Content-Type: application/json

{"query": "query { Page(first: 3, filter: {parent: null}) { id, name, fullPath } }"}

# 200 {"result": "success", "data": {"Page": [{"id": 1, "name": "Home", "fullPath": "/"}]}}

See The GraphQL API and the GraphQL reference.

In the API reference: Run a query.

More in API requests

  1. My form submission through the API answered 207
  2. One visitor's form shows up twice among the submissions
  3. Showing an error when a JS-model submission is rejected
  4. A conditional field never appears, or never hides
  5. My properties fields come back as "Error: Getter for property … not found", or glued together

Was this page helpful?

Your answer goes to the docs team.