Open sacrampton opened 2 years ago
Just checking if there is any response on this issue?
Hi @sacrampton, we've raised this with our Product Managers and will consider it as a future enhancement. Just to set expectations, this will probably not be prioritized this year due to us having many features in the back log already.
Is this related to a new or existing framework?
React Native
Is this related to a new or existing API?
DataStore
Is this related to another service?
No response
Describe the feature you'd like to request
The repository for all of our data is DynamoDB, which as a No-SQL database which is a really efficient way to store data. For a particular Model (Asset) we have ~400 attributes defined, but we only need to store attributes that actually exist in DynamoDB - but we have the flexibility to store more as required by our process.
On the mobile app we only need a fraction of these attributes so ideally we could specify a GraphQL response and only the fields in the GraphQL response is sent to DataStore.
For example, I have ~400 attributes on an Asset record, but I might only want 4 attributes on the mobile app and can specify that in the GraphQL response.
However, to get DataStore working with adequate performance we need to use SQLite - a relational database. So we have no alternative but to download all ~400 attributes - most with NULL values - down to DataStore on the mobile app. This results in a massive database mostly taken up with NULL values because it ignores any GraphQL response and sends all attributes - even if NULL - to SQLite.
Describe the solution you'd like
Being able to specify a GraphQL response and having ONLY the fields detailed in the GraphQL response sent to the DataStore SQLite repository.
Describe alternatives you've considered
Don't know any alternative
Additional context
No response
Is this something that you'd be interested in working on?