graphql / graphql/graphql.github.io

Schema Diffing for Authorization

Open
#733 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

💬 Feedback
Dominant language
TypeScript
Stars
889
Forks
1.5k
Avg merge
4d 12h
Merged PRs (30d)
21

Description

After briefly discussing this approach in GraphQL-spec (https://github.com/graphql/graphql-spec/issues/592) I realized that this should instead be added as best-practice and not necessarily be part of the spec. Since the initial RFC, I have also added this information in "graphql-rules", available here: (https://graphql-rules.com/rules/authorization-schema-diffing) {https://github.com/graphql-rules/graphql-rules/pull/13}

As of now graphql.org suggests a single method of authorization; however in practice I have had to implement a different approach to address various concerns which I have discussed in the links mentioned before.

The Schema diffing approach can be likened to an API Gateway implementation of authorization and has it's benefits; as such I suggest that we include this approach in the knowledge base so that it can be more widely used and discussed.

Contributor guide

Open the contributing guide

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

Review the existing authorization guidance on graphql.org and the linked graphql-rules rule, then locate the site's knowledge-base content entry point. Done means the schema-diffing approach is documented as a best practice alongside the existing method and its rationale is clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, authorization, documentation
Issue type
Documentation
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.