I'm looking to instrument my absinthe/phoenix server. I would like to find out how long it takes to encode data as json using Jason.
My endpoint.ex file looks like following:
defmodule AssessmentApi.Web.Endpoint do
use Phoenix.Endpoint, otp_app:…
Any idea why I would get this error on:
connection(node_type: non_null(:thing), non_null: true)
== Compilation error in file lib/app/things/types.ex ==
** (Protocol.UndefinedError) protocol String.Chars not implemented for {:non_null, [line: 7],…
I have an object in my Absinthe graphql schema that looks like this:
object :match do
field(:id, non_null(:id))
field(:opponent, non_null(:string))
@desc "The number of votes that have been cast so far."
field(:vote_count,…
I have finished reading Craft GraphQL APIs in Elixir with Absinthe (Pragprog) and I am trying to expand upon the item_controller.ex to allow for “menu item” editing.
I have made these functions in the controller:
@graphql """
query ($id: ID!) {
…
The integration between Absinthe and Dataloader is quite new for me, so any help is welcome.
I'm running into the following error:
** (FunctionClauseError) no function clause matching in anonymous fn/3 in Absinthe.Resolution.Helpers.dataloader/2
My…
I'm not sure what changed in Chrome but the Graphiql GUI tool is not loading.
In Firefox and Safari it works just fine. I have disabled all Chrome extensions, restarted Chrome, and restarted my Mac. The error persists. How do I debug this?
In…
My Schema:
subscription do
@desc "Subscribe to drawing change"
field :drawing_change, :drawing do
# arg(:drawing_id, non_null(:id))
config(fn _args, _resolution ->
{:ok, topic: "*"}
end)
end
end
When I…
Using Elixir/Absinthe/Ecto/Dataloader, how do you query/filter a source by multiple fields?
Example:
Let's say you would want to filter a schema (and dataloader source) named User by two fields, one named is_admin (only true values) and one group_id…
I was doing the Absinthe tutorial for Elixir using the howtographql.com website. At some point (https://www.howtographql.com/graphql-elixir/2-queries/), when running the last step of running the graphql server, I get an error.
Command executed:
$…
Im trying to pass from information from my resolver function to my middleware such that I can set a cookie in the response.
The use-case is I want to generate an Oauth2 authorization link which allows the client to begin an Oauth2 flow with a third…
I'm using Elixir with Phoenix and Absinthe to set up a GraphQL backend.
Ideally, I'd like to have a structure that looks like this:
{
posts {
published {
title
}
draft {
title
}
}
}
To do so, I thought I would need…
I am trying to setup a Phoenix API with GraphQL.
I have a Team table and a Game Table in my DB like this:
schema "teams" do
field :name, :string
has_many :games, LvdnApi.Fixtures.Game
timestamps()
end
schema "games" do
…
I have a Phoenix app with Absinthe for a Graphql API.
Guardian is used to authenticate requests that provide a Bearer token in the header. This is all working great until an invalid token is provided. I have specified an error handler in my Guardian…
I have a requirement to post comments in an application. This was implemented and is working fine. Now, I got an additional requirement to upload a photo along with the comment. So, I implemented the camera feature in the app and I am sending the…
Hello everyone I'm just new to Elixir, generally new to FP. So basically I try to learn Elixir and afterwards jump to building a graphql api server.
I read and follow the book "Craft GraphQL APIs in Elixir with Absinthe" and stuck at the testing…