README.md

# Fennel

GraphQL Client

  * Statically validated queries
  * Can query both local and remote schemas
  * Extensions (TODO)
  * Caching (TODO)

Under the hood it's using [Absinthe](https://github.com/absinthe-graphql/absinthe),
it's used for SDL parsing, valdations and configuring schema.

[demo](https://twitter.com/arathunku/status/1423315395310669827)

<!-- MDOC -->

## 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

- https://github.com/github/graphql-client/blob/master/guides/handling-errors.md
- https://github.com/graphql-rust/graphql-client
- https://formidable.com/open-source/urql/docs/architecture/22