Lee Pender

@leebot

Joined on Apr 3, 2019

  • For whatever reason, Prismic doesn't really make many details public about how their APIs work, instead choosing to obscure this information in a number of libraries. This approach is no doubt a well-intentioned attempt to make things "simple," but, as anyone who as ever encountered a leaky-abstraction will tell you, it ends up making things much more difficult. The approach sacrifices the elegance and flexibility of the platform, raises the barrier to entry and is patronizing to competent developers. However, the product itself is great and I'm already quite committed. So rather than leave, I thought I'd take it upon myself to write the missing Prismic documentation. Fetching data via GraphQL When sending a query to GraphQL endpoint, the following headers are required: Content-Type: "application-json"
     Like  Bookmark
  • Steps To Reproduce Visit www.example.com Click on ... Actual Result I see X Expected Result
     Like  Bookmark
  • By: lee@lunchtimelabs.io Date: February 23rd, 2021 Use Structs I was reading some data from a remote API today and I wanted to be able to type check the data as it was coming in. Elixir has the concept of the Struct which can enforce some type-safety on a Map. But it's not straightforward to see how to convert a JSON response to a type-checked Struct.
     Like  Bookmark
  • Example with a dead letter exchange defmodule MyApp.MyConsumer do use Broadway @exchange Application.fetch_env!(:my_app, :my_exchange) @exchange_dlx Application.fetch_env!(:my_app, :my_exchange_dlx) @queue Application.fetch_env!(:my_app, :my_queue) @queue_dlx Application.fetch_env!(:my_app, :my_queue_dlx) def start_link(_opts) do
     Like  Bookmark