3 ms·
The simplest way to add auth is to read a user session and provide it in the context, and then do the logic in the resolver for access control. It's not any dif
by chrischen 3y ago
The simplest way to add auth is to read a user session and provide it in the context, and then do the logic in the resolver for access control. It's not any different from how you would do it in a regular REST based server and GraphQL certainly doesn't do anything specific to get in your way about it. Not sure why people keep bringing auth and scalability into it. Clearly facebook invented and uses it for the purpose of auth and scalability.