Currently when defining a query or mutation method that has a non-nullable Principal argument, it fails with "Unresolved NullPointerException for executionId ..." when no principal is present in the security context.
The same scenario in a @RestController would result in 401 Unauthorized response.
It would be convenient if spring-graphql automatically validated the presence of a principal, when the argument is defined as non-null, and throws an AuthenticationException when not set, which then could be handled in an exception resolver.