Search⌘ K

Securing Fields

Explore how to secure GraphQL API fields by enforcing authorization in Elixir. Understand how to check user context within resolvers and restrict access to sensitive actions, ensuring only authorized users can perform specific tasks while maintaining robust API security.

We'll cover the following...

Since we now have a way to get the current user, we need to enforce authorization on particular fields to check the context. Knowing the current user also gives us the ability to retrieve associated records in our resolvers and return user-specific information.

Inline authorization

Before we let customers anywhere near this API, we need to put some authorization checks between the current user ...