Data Models & Authorization

  • TickTry out Hasura’s Data API and Authorization features through examples
  • TickExplore Database schemas, relationships and permissions
  • TickDemos of database specific concepts like views and functions.

Categories

  • Core ConceptsCore Concepts
  • Intermediate ImplementationsIntermediate Implementations
  • Sample Data ModelsSample Data Models
AllAll Integrations
Default img
Views: Group By & Aggregate
Views can be used to expose the results of a custom query as a virtual table. This example demonstrates grouping by a column and aggregating.
Default img
Functions: Multiple Column Text Search
Custom functions are ideal solutions for retrieving some derived data based on some custom business logic that requires user input to be calculated. This is an example of using a custom function to create a text search across multiple columns.
Default img
Enum: Reference Table
Using foreign-key references to a single-column table allows us to represents an enum using ordinary relational database concepts using Hasura.
Default img
Relationships: One-to-One
A one-to-one relationship between two tables can be established via a unique foreign key constraint and tracked using Hasura.
Default img
Relationships: One-to-Many
A one-to-many relationship between two tables can be established via a unique foreign key constraint and tracked using Hasura.
Default img
Relationships: Many-to-Many
A many-to-many relationship, established by creating a table & adding foreign-key constraints from it to the original tables, can be tracked using Hasura.
Default img
Permissions: Row-Level (Basic)
Row-level permissions can be set based on a user's role or any session variables.
Default img
Permissions: Column-Level Filtering
Column-level permissions determine access to columns that are accessible by the user's role.
Default img
Functions: Fuzzy-Match Search
This is an example of a fuzzy-match search function across multiple columns. This schema is installable through Hasura Console.
Default img
Functions: Accessing Session Variables
Create a function with an argument for session variables and track it using your Hasura API.
Default img
Data Model: Location Tracking
A fully-functioning location tracking model to build a realtime GraphQL API