jedschneider
jedschneider
AEAsh Elixir
Created by jedschneider on 2/5/2023 in #support
flat file json or yml data layer
I have a very deeply nested JSON object that we think might be really nice to wrap a GraphQL query API over. Unless I missed it, I don't see data layers similar to the CSV data layer that are targeting flat files in JSON/YML but I think the example of the CSV data layer would be a good starting spot in terms of seeing what needs to be implemented for the behavior. I only really need to support read/query actions, and ideally I'd like to provide the data from the previous GQL field as the context for any child fields. I'm pretty sure I could devise a pretty quick strategy for this in Absinthe just based on dated but previous experience but I'm attracted to the resource model of ash and some of the adjacent functionality I could implement around the GQL API. Is there a direction I should start in regards to read/query only access to flat files and context passing between associations that exist as sub-resources on a type that plays well with Ash OOTB? Is writing my own data layer the best or only design choice?
20 replies