This folder contains full code samples for the Securing Your Application tutorial.
Note that the code is a bit rudimentary - meaning it could be refactored a bit. For example, throughout the whole code, we're essentially copying authorization logic code. This should probably be abstracted within a simple utility function, or, in case of React code, a simple React hook.
This can be seen in GraphQL API resolvers, for example in CarManufacturersQuery.ts
. In Admin Area application code, this can be seen in menus.tsx
and CarManufacturersDataList.tsx
.
If you'd like to see a refactored version here as well, please give us a ping on our community Slack.