Let's say a graphql request is made:
query {
profile { id name age }
}
and age is not in the schema (or the role-based schema).
It is desirable in most situations to still receive the response for id & name along with an additional errors object adjacent to the data that is sent in the response. This is a behaviour desired only if these columns are used in the selection-set and not in the arguments. Currently the response is that graphql query validation failed entirely.
(via ben/cherre and matt/dsi)
@0x777 @dsandip this needs quick triaging.
@0x777 comments?
Incidentally, @shahidhk, this is the behaviour with the github graphql api too right?
@coco98 This behavior will not be GraphQL spec compliant. When there are any validation errors, we can't proceed to execution. According to GraphQL spec only if there are errors during execution (i.e, after validation), partial data can be returned.
@coco98 What's the use-case for letting a user with limited scope run such a query in the first place? This seems to be indicative of something being off with the permissions configured for this role.
I guess what the GitHub API does is that permissions are checked on the execution phase rather than in the validation phase like us.
This cannot be done with our role based schemas.
This can only be done if we abandon our current role based schemas (which I think is a bad idea) so I'm closing this.