<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>elixir on Maarten van Vliet</title>
    <link>https://maartenvanvliet.nl/tags/elixir/</link>
    <description>Recent content in elixir on Maarten van Vliet</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <copyright>Maarten van Vliet</copyright>
    <lastBuildDate>Tue, 27 Dec 2022 00:08:54 +0100</lastBuildDate><atom:link href="https://maartenvanvliet.nl/tags/elixir/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>TIL - Implementing Encoder for NifStructs</title>
      <link>https://maartenvanvliet.nl/2022/12/27/til-rustler-encoder/</link>
      <pubDate>Tue, 27 Dec 2022 00:08:54 +0100</pubDate>
      
      <guid>https://maartenvanvliet.nl/2022/12/27/til-rustler-encoder/</guid>
      <description>I am currently using Rustler, a tool that allows for Elixir to interact with the Rust ecosystem. As a newcomer to Rust, working on Rust-Elixir crossover libraries helps me understand its quirks.
Today, I was trying to use a SQL parser in Rust and convert the results to Elixir terms. Rustler&amp;rsquo;s NifStructs feature made this process convenient. However, I encountered an issue with a data structure defined as follows:
#[derive(NifStruct)] #[module = &amp;#34;SqlParser.</description>
    </item>
    
    <item>
      <title>Creating an Input Union Type System Directive in Absinthe</title>
      <link>https://maartenvanvliet.nl/2022/04/28/absinthe_input_union/</link>
      <pubDate>Thu, 28 Apr 2022 11:08:54 +0100</pubDate>
      
      <guid>https://maartenvanvliet.nl/2022/04/28/absinthe_input_union/</guid>
      <description>In this post I will explain how to create a type system directive in Absinthe to implement Input Unions in Graphql. The code for this post can be found on Github
A common issue with GraphQL is the lack of input unions. This means an input object that lets you choose between a number of potential input types.
For example (taken from a spec discussion):
input PetInput { cat: CatInput dog: DogInput fish: FishInput } input CatInput { name: String!</description>
    </item>
    
    <item>
      <title>Formatting GraphQL in Elixir projects</title>
      <link>https://maartenvanvliet.nl/2022/01/26/absinthe_formatter/</link>
      <pubDate>Wed, 26 Jan 2022 11:08:54 +0100</pubDate>
      
      <guid>https://maartenvanvliet.nl/2022/01/26/absinthe_formatter/</guid>
      <description>With the release of Elixir 1.13 it became possible to add plugins to the formatter. These plugins gives developers the option to hook into the Elixir formatter.
I&amp;rsquo;ve created an Elixir formatter plugin to Absinthe to format GraphQL documents. With the release of Absinthe 1.7 this is available for everyone to use.
To start, you&amp;rsquo;ll need Absinthe 1.7 or higher together with Elixir 1.13 or higher.
The Absinthe project comes with Absinthe.</description>
    </item>
    
    <item>
      <title>Absinthe subscriptions-transport-ws websocket</title>
      <link>https://maartenvanvliet.nl/project/subscriptions_transport_ws/</link>
      <pubDate>Sat, 02 Oct 2021 12:04:18 +0200</pubDate>
      
      <guid>https://maartenvanvliet.nl/project/subscriptions_transport_ws/</guid>
      <description>Absinthe subscriptions-transport-ws websocket Support subscriptions-transport-ws websocket protocol for Absinthe
https://github.com/maartenvanvliet/subscriptions-transport-ws</description>
    </item>
    
    <item>
      <title>Absinthe subscriptions with ReasonML and Urql</title>
      <link>https://maartenvanvliet.nl/2020/09/21/reason_urql_and_absinthe/</link>
      <pubDate>Mon, 21 Sep 2020 09:08:54 +0100</pubDate>
      
      <guid>https://maartenvanvliet.nl/2020/09/21/reason_urql_and_absinthe/</guid>
      <description>Lately I&amp;rsquo;ve been looking into ReasonML as a language to pick up. In the past I&amp;rsquo;ve dabbled with Elm and really enjoyed it but it&amp;rsquo;s lack of interoperability with javascript hampers its development. ReasonML offers a far better story in this regards, there are excellent React and React-Native libraries/bindings available as well as bindings for popular Graphql clients. That, combinated with great type-safety makes it a compelling alternative to Elm and Typescript.</description>
    </item>
    
    <item>
      <title>Urql graphql subscriptions with Absinthe</title>
      <link>https://maartenvanvliet.nl/2020/08/29/absinthe_and_urql/</link>
      <pubDate>Sat, 29 Aug 2020 11:08:54 +0100</pubDate>
      
      <guid>https://maartenvanvliet.nl/2020/08/29/absinthe_and_urql/</guid>
      <description>Many Graphql stacks use Apollo as the javascript client library. It&amp;rsquo;s well maintained, popular and has lot&amp;rsquo;s of examples. It also works together with Absinthe, the Elixir Graphql library. If you need to use graphql subscriptions in combination with Apollo and Absinthe there is the socket-apollo-link to connect the two.
There&amp;rsquo;s another interesting javascript client library for Graphql on the horizon, Urql. It&amp;rsquo;s a bit more lightweight and looks really promising.</description>
    </item>
    
    <item>
      <title>Serve Letsencrypt certificates dynamically for Plug/Phoenix</title>
      <link>https://maartenvanvliet.nl/project/certbot/</link>
      <pubDate>Fri, 12 Jul 2019 10:04:18 +0200</pubDate>
      
      <guid>https://maartenvanvliet.nl/project/certbot/</guid>
      <description>Certbot hex package Serve Letsencrypt certificates dynamically for Plug/Phoenix</description>
    </item>
    
    <item>
      <title>Using Recursive Common Table Expressions with Ecto</title>
      <link>https://maartenvanvliet.nl/presentation/sketch_rcte/</link>
      <pubDate>Thu, 02 May 2019 12:04:18 +0200</pubDate>
      
      <guid>https://maartenvanvliet.nl/presentation/sketch_rcte/</guid>
      <description>A presentation I gave at the Amsterdam Elixir Meetup.
We faced a problem where we needed to recursively load records from a database. The application was doing the recursion itself, recursively querying the mariadb instance. I explained how we moved to RCTE&amp;rsquo;s and how this works in Ecto.
Slides</description>
    </item>
    
    <item>
      <title>Absinthe SDL</title>
      <link>https://maartenvanvliet.nl/project/absinthe_sdl/</link>
      <pubDate>Wed, 02 Jan 2019 12:04:18 +0200</pubDate>
      
      <guid>https://maartenvanvliet.nl/project/absinthe_sdl/</guid>
      <description>Absinthe SDL Create Graphql SDL schemas from Absinthe schemas</description>
    </item>
    
    <item>
      <title>Writing your own Absinthe DSL with macros and middleware</title>
      <link>https://maartenvanvliet.nl/2018/12/29/absinthe_macro_dsl/</link>
      <pubDate>Sat, 29 Dec 2018 11:08:54 +0100</pubDate>
      
      <guid>https://maartenvanvliet.nl/2018/12/29/absinthe_macro_dsl/</guid>
      <description>Absinthe is a great library to do graphql in Elixir. However, when writing your resolvers you may find that you are writing some boilerplate multiple times. So, in the spirit of keeping your code DRY, in this post I&amp;rsquo;ll show how we can leverage middleware and a macro to write your own DSL for your Graphql api.
I assume some basic knowledge on how Absinthe works, most of the information can be found on in the guides</description>
    </item>
    
    <item>
      <title>Receivex - incoming email webhook handler</title>
      <link>https://maartenvanvliet.nl/project/receivex/</link>
      <pubDate>Sat, 15 Dec 2018 23:04:18 +0200</pubDate>
      
      <guid>https://maartenvanvliet.nl/project/receivex/</guid>
      <description>Receivex hex package Library to handle incoming email webhook from popular mail providers</description>
    </item>
    
    <item>
      <title>Automatic Persisted Queries hex package</title>
      <link>https://maartenvanvliet.nl/project/apq/</link>
      <pubDate>Sat, 01 Dec 2018 23:04:18 +0200</pubDate>
      
      <guid>https://maartenvanvliet.nl/project/apq/</guid>
      <description>APQ hex package Cache Apollo graphql queries automatically on Absinthe</description>
    </item>
    
    <item>
      <title>Writing an Absinthe Phase</title>
      <link>https://maartenvanvliet.nl/2018/09/07/writing-an-absinthe-phase/</link>
      <pubDate>Fri, 07 Sep 2018 22:35:36 +0200</pubDate>
      
      <guid>https://maartenvanvliet.nl/2018/09/07/writing-an-absinthe-phase/</guid>
      <description>Absinthe does a lot when you fire a GraphQL query at it. The incoming query is parsed into an internal representation, validated and finally executed. This process is done by phases, these are individual modules chained together in a pipeline that each do a single step in processing the queries.
Phases in Absinthe do a lot of work. They are the building blocks in validating and executing the GraphQL query. E.</description>
    </item>
    
    <item>
      <title>Absinthe Tips and Tricks</title>
      <link>https://maartenvanvliet.nl/2018/09/05/absinthe-tips-and-tricks/</link>
      <pubDate>Wed, 05 Sep 2018 22:18:38 +0200</pubDate>
      
      <guid>https://maartenvanvliet.nl/2018/09/05/absinthe-tips-and-tricks/</guid>
      <description>Absinthe is a great package for building GraphQL api&amp;rsquo;s in Elixir. It is fast, good DSL and overall great implementation of the GraphQL spec for servers.
Working with Absinthe I&amp;rsquo;ve come across some patterns that have helped clean up code. I&amp;rsquo;d like to share some of them here.
The Self function Imagine you have an image object you want to expose, and for each image you want a separate object with just the dimensions of the image.</description>
    </item>
    
    <item>
      <title>Swotex hex package</title>
      <link>https://maartenvanvliet.nl/project/swotex/</link>
      <pubDate>Sun, 12 Aug 2018 23:04:18 +0200</pubDate>
      
      <guid>https://maartenvanvliet.nl/project/swotex/</guid>
      <description>Swotex hex package Identify email addresses or domains names that belong to colleges or universities.</description>
    </item>
    
    <item>
      <title>Looking back at year in tech</title>
      <link>https://maartenvanvliet.nl/2017/12/30/tech_2017_looking_back/</link>
      <pubDate>Sat, 30 Dec 2017 22:34:06 +0200</pubDate>
      
      <guid>https://maartenvanvliet.nl/2017/12/30/tech_2017_looking_back/</guid>
      <description>Retrospective Last year was an interesting year for me. I was able to try out a whole lot of new technologies, assess their capabilities and get a good look at their pros and cons. I want to go over a couple of them, and shortly summarize my findings.
Typescript In short, Typescript made Javascript fun for me again. Although a lot of this can be attributed to the support of ES6/ES7 in Typescript.</description>
    </item>
    
    <item>
      <title>Upgrading Phoenix to Http2</title>
      <link>https://maartenvanvliet.nl/2017/12/15/upgrading_phoenix_to_http2/</link>
      <pubDate>Fri, 15 Dec 2017 21:30:43 +0100</pubDate>
      
      <guid>https://maartenvanvliet.nl/2017/12/15/upgrading_phoenix_to_http2/</guid>
      <description>Upgrading phoenix framework to serve http2 Http2 is the next version of the http protocol and offers several advantages. It serves over a single connection, reducing the number of roundtrips necessary. With multiplexing it can handle multiple requests at the same time and as a whole is just better.
As the internet slowly moves to support http2, Phoenix does not lag behind. The webserver Phoenix uses, Cowboy, has released version 2 with support for http2 and the updates to Phoenix and Plug have followed in its path.</description>
    </item>
    
    <item>
      <title>Uploading to Google Cloud Storage using Arc and Phoenix</title>
      <link>https://maartenvanvliet.nl/2017/08/05/arc_uploads_to_google_cloud_storage/</link>
      <pubDate>Sat, 05 Aug 2017 22:34:06 +0200</pubDate>
      
      <guid>https://maartenvanvliet.nl/2017/08/05/arc_uploads_to_google_cloud_storage/</guid>
      <description>In this post I will demonstrate how to upload to Google Cloud Storage using Arc and Arc.Ecto in Phoenix. There are several examples on how to use Arc in combination with S3 or local file uploads but the GCS integration is a bit more unknown. I assume you have an up to date elixir installation and know your way around Phoenix and GCS.
mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez mix phx.new web --no-brunch Follow instructions to configure your postgres credentials in config/dev.</description>
    </item>
    
  </channel>
</rss>
