Scopes should be validated before resolving of the request begins

Created on 19 March 2024, 8 months ago

Problem/Motivation

In the current model the scopes are checked only when we get to a field because we do so in the field resolver. However, this causes two problems.

First it runs the risk of performing a lot of work before we run into a scope that's not allowed and then bailing out with an error which throws away all the work done.

Secondly we may never provide an error to a client if a parent of a field that requires a scope returns NULL and the field resolver is never executed.

Steps to reproduce

Proposed resolution

Rewrite the implementation for the scope checker to perform its check before the request is resolved so that we already know all fields in the request are allowed.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇳🇱Netherlands kingdutch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024