API Reference fennel v0.0.1
Modules
TODO
- [ ] TODO: Use https://hexdocs.pm/elixir/1.3.3/Inspect.Algebra.html to gen query
- [ ] TODO: add fetch policies - cache-only, cache-first(default), network-only (see Apollo)
- [ ] TODO: warn/error when deprecated fields are used -> Custom builder Phase
- [ ] TODO: support multiple operations inside one query
- [ ] TODO: Optimistic update
- [ ] TODO: Emit events when cache was updated. LiveView needs to know when to refetch data
- [ ] TODO: Disable broadcast about updated cache via Process dict, example: Phoenix Controller
- [ ] TODO: persisted queries
- [ ] TODO: Cast result strings to ATOMs (safely!)
- [ ] TODO: Handle websocket subsription connection issues?
- [ ] TODO: Adapter support for http
Inspiration
Based on data from cache, it resolvers all links and puts it back into original, operation structure
Based on passed data and operation, it constructs a list of [{ cache_key, cache_value }] that puts entities into cache, togther with a final query.
Hold GraphQL query. It's original string, parsed structure.
You can use sigil by importing it from defined client module.
Based on previously built Absinthe blueprint, it creates a query string that can be sent as a query to a server.
Based on operation, it tries to fetch it from cache
Based on fetched data, it puts it back into fields.
For simplicity, we match phases from Absinthe.Pipeline.
Struct holding configuration during query execution.