Skip to content

Files

Latest commit

 

History

History
11 lines (6 loc) · 646 Bytes

authorization.md

File metadata and controls

11 lines (6 loc) · 646 Bytes

Authorization

Certain mutations will require admin authorization. This is to demonstrate the implementation of authorization in a GraphQL server using the GraphQL AuthZ package and the corresponding plugin for Pothos.

Authenticating as an Admin

The Admin user ID needs to be passed on the x-user-id header on the request. To find the value of this ID, check the Database file under the users field.

Default to Guest

If you don't need to be an admin, omitting the x-user-id header will default you to the Guest user.