graphql-python / graphql-python/graphene

401 status code for token authentication

Open
#1,269 4 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.2k
Forks
818
PR merge metrics
No merged PRs in 30d

Description

I think in the case of token authentication, it would make sense to be able to return a 401, even if only one field errors out this way (referring to the example given in the original post). This status code is necessary to make this library compatible with authMiddleware in React Relay Network Modern, which expects a 401 status code to refresh tokens.

Originally posted by @berkcoker in https://github.com/graphql-python/graphene/issues/946#issuecomment-698617718

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked original issue and the React Relay Network Modern authMiddleware requirement. Trace the token-authentication error path in Graphene to determine how a 401 could apply when one field errors. Done means the behavior is implemented with regression coverage and remains compatible with normal GraphQL error responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, python
Domain
api, authentication
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.