Arvand
Author
Oliver Favalli
@oliverhf
Blog / Features & Technologies

Phoenix & Absinthe

Phoenix and absinthe

Phoenix using Absinthe which is a GraphQL toolkit for Elixir (a functional programming language designed to enable massive concurrency a top robust application architectures). It saves a lot of time for the development team.

The use of Absinthe in a project will cut down a lot of questions because, GraphQL is great way for self documenting.

Absinthe does support graphical, therefore you can have an endpoint that's graphical and people can just explore what all the queries are and what they take and try to running them, being able to see what comes back.

More advantages

  1. GraphQL is faster
  2. It is way faster than other communication APIs because it allows you to choose only the specific fields you want to query.

  3. Avoids over-fetching and under-fetching issues
  4. The main advantage of GraphQL over RESRT is that REST responses contain a lot of data or lack of it, causing the need for another request. GraphQL solves this problem by fetching only the exact and specific data in a single request.

  5. Hierarchical Structure
  6. GraphQL follows a hierarchical structure where relationships between objects are defined in a graphical structure. For every object type, there is a representation of a component, and every relationship field from an object type to another represents a component wrapping another component.

  7. Strongly typed
  8. It is a strongly typed language where each level of a GraphQL query corresponds to a particolar type, and each type describes a set of available fields. It is similar to SQL and provides descriptive error messages before running a query.

What are the downsides of using Absinthe?

The caching can be a bit harder with GraphQL because, you have a lot more possible responses from it. There are tools that have been made to help with that such as: data loader (main option).

Related posts