- Newest
- Most votes
- Most comments
There are different aspects to your question and I'll try to give my point of view on some of these aspects.
Creating a graph view using GraphQL is the most flexible way as you have both a schema that you can work with as well as the ability to connect different entities in a flexible way. You don't need to connect the data in the database such as the way that you do in a relational database with foreign keys or a similar way in DynamoDB. Once you start building the graph in GraphQL using AppSync you will add some indexes to make the resolvers work faster when building the hierarchical objects. Please note that you will be building the actual objects with their values and not only their hierarchy.
If you want to have multi-tenants in the account, the solution depends on the number of tenants. If you have a few large ones or many small ones, the solution should be different.
For a few large ones, you can create a dedicated AppSync API that will have a dedicated schema for each customer. Please note that the schema can be different, however, the data can point to the same DynamoDB tables using slightly different resolvers and GraphQL schema. Such multiple GraphQL schemas give you the maximum flexibility to customize the experience for each customer, as large customers expect.
For many small customers, you can store in DynamoDB the configuration of each customer. The configuration can have various types of data, from the hierarchy they want to graphQL queries they requested. Your application will look up this customer configuration table in DynamyDB, parse it, and use it to generate the specific interface requested by each customer.
Relevant content
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago