# Securing APIs declaratively with GraphQL

DevFeed: [Securing APIs declaratively with GraphQL](<https://devfeed.tech/articles/securing-apis-declaratively-with-graphql-23274.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/directive-based-authorization-for-financial-services>)

Author: Shane Myrick

Published: 2023-03-10T20:42:46Z

Content type: tutorial

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [GraphQL](<https://devfeed.tech/topics/graphql.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [Authorization](<https://devfeed.tech/topics/authorization.md>), [GraphOS](<https://devfeed.tech/topics/graphos.md>), [API](<https://devfeed.tech/topics/api.md>), [Security](<https://devfeed.tech/topics/security.md>), [JSON Web Tokens](<https://devfeed.tech/topics/jwt.md>)

Tags: [apis](<https://devfeed.tech/tags/apis.md>), [apollo](<https://devfeed.tech/tags/apollo.md>), [auth](<https://devfeed.tech/tags/auth.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [graphos](<https://devfeed.tech/tags/graphos.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jwt](<https://devfeed.tech/tags/jwt.md>), [router](<https://devfeed.tech/tags/router.md>), [security](<https://devfeed.tech/tags/security.md>)

## AI overview

This tutorial explains how GraphQL schema directives can support declarative authentication and authorization for APIs and data in financial services applications. It describes using directives to apply runtime security logic to specific schema fields, including checking for JWTs, and notes that Apollo has shipped built-in authentication and authorization features in Apollo Router.

## Source excerpt

This post is a part of our "How to power modern financial services apps with Apollo GraphOS" series. Also in this series: - Deliver a personalized customer experience with GraphQL - Adopt a Customer 360 approach to prevent fraud with GraphQL - Ensure compliant and secure third-party access using GraphOS Update: Auth now available in Apollo Router Apollo has shipped our new authentication and authorization features as built-in Router features.