Authenticated
Provides an @authenticated
directive, for subgraphs, which prevents access to elements in the query when the user is not authenticated.
# grafbase.toml
[extension.authenticated]
version = "1.0"
Run the install command before starting the gateway
grafbase extension install
# subgraph schema
extend schema
@link(
url: "https://grafbase.com/extensions/authenticated/1.0.0"
import: ["@authenticated"]
)
type Query {
public: String!
mustBeAuthenticated: String! @authenticated
}