The following article show String boot GraphQL authorization with bearer token. This will be a good source to understand how Spring security work too.

Spring boot GraphQL authorization with bearer token
Github code