MS SQL Server: Relationships between Tables/Views/Native Queries
To make nested object queries, the tables/views/Native Queries in your database need to be connected via relationships.
Let's say we have the following tables in our database:
The tables/views in any relational database are typically related to each other via one of the following types of table relationships:
GraphQL schema relationships
Each table relationship, as you can see from the above section, will have two component relationships (one in either direction) in the GraphQL schema. These relationships can be one of the following types:
|an ||an |
|an ||an |
The relationship name is used to refer to the nested objects in queries. For example, "
articles" of an
author" of an
Managing GraphQL relationships
See the following to manage the object/array relationships between tables/views for the GraphQL schema:
Table relationships modeling guides
The following guides will help you model the different types of table relationships in the database: