How to handle auth

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Quiet
Tech stack
graphql

Research direction

Review the golden path references to auth through the linked repository code search, then compare the existing GraphQL authorization page and the linked Ent privacy guidance. Clarify whether authentication belongs in the golden path and agree on the supported guidance before making a documentation change.

Written by the indexing model from the issue text.

Description

I see a few mentions of "auth" in the golden path (https://github.com/search?q=repo%3Agraphql%2Fgolden-path%20auth&type=code) but no guidelines yet on how best to implement auth.

Is this something you think the golden path should cover? Or is this scope creep (since it implies setting guidance on the rest of your architecture too).

We already have a page on this here: https://graphql.org/learn/authorization/

Which suggests 2 options:

  1. put auth in a logic layer
  2. use an @auth (or similar) directive

fwiw, imo: (1) > (2), but (2) is more popular[citation needed] because not many OSS ORM libraries have this built-in, in the same way that ent does.

Maybe the golden path can suggest that either of these are acceptable, with a preference for (1) if available.

wdyt?

Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from graphql/golden-path

All issues in graphql/golden-path

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.