GraphQL Endpoint
The GraphQL API is available at:Authentication
Many queries and mutations require authentication. OWASP Nest uses session-based authentication via GitHub OAuth2.Authenticating
First, authenticate using thegithubAuth mutation:
Logging Out
Schema Introspection
You can explore the entire GraphQL schema using introspection queries. This is useful for discovering available types, fields, and operations.Full Schema Query
Query Type Fields
Discover all available queries:Mutation Type Fields
Discover all available mutations:GraphQL Features
Query Depth Limiting
OWASP Nest GraphQL API enforces a maximum query depth of 5 levels to prevent performance issues. Queries exceeding this depth will be rejected.Introspection
Introspection is enabled in development mode but disabled in production for security reasons.CSRF Protection
All GraphQL requests require a valid CSRF token. You can obtain a CSRF token from the/csrf/ endpoint before making GraphQL requests.
Error Handling
GraphQL errors are returned in theerrors array of the response:
- Authentication errors: User not logged in or lacks permissions
- Validation errors: Invalid input data (e.g., dates, limits)
- Not found errors: Requested resource doesn’t exist
- Permission errors: User lacks required permissions