AdobeDocs / AdobeDocs/commerce-webapi

Incorrect Docs Regarding GraphQL Status Codes

Open
#362 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
13
Forks
120
Avg merge
2d 3h
Merged PRs (30d)
8

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Which topic?

https://github.com/AdobeDocs/commerce-webapi/blob/main/src/pages/graphql/usage/api-response.md

### What's wrong with the content?

The docs talk about GraphQL responses giving standard HTTP response codes (200, 401, 403, and 500) on queries, but I don't believe that's correct. Unless I'm missing something, Magento and Adobe Commerce always return a 200 status code for anything processed by GraphQL, or a 500 error if something wrong happened in the transport layer or if the request was malformed (e.x. missing a bracket in the body).

Even following the example given in the documentation -- querying customer info without a valid token -- returns a 200 when I test it, not the 401 that the docs say it should.

### What changes do you propose?

Remove references to the 401 and 403 status codes from the documentation, or if there are queries that do result in non-200 or 500 error codes, update the docs with those examples instead.

### Anything else that can help to cover this?

_No response_

Contributor guide

Open the contributing guide

Research direction

Open src/pages/graphql/usage/api-response.md and review the documented status-code examples, then reproduce the invalid-token and malformed-request cases described in the issue. Compare the observed responses with the current text and update the page so its examples and status-code guidance match verified behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql
Domain
api, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.