I have a problem with phoenix 1.3 + absinthe.
I try this code:
schema "urls" do
field :path, :string
timestamps()
end
object :url do
field :id, :id
field :path, :string
field :inserted_at, :datetime
end
It work with id and path but it…
I have a GraphQL API that works just fine using conventional resolve functions. My goal is to eliminate the N+1 problem.
To do so I've decided to use the Dataloader. I've done these steps to supposedly make the app run:
I added these two functions…
I'm trying make authorization/authentication graphql subscriptions with elixir and absinthe using cookies and I used the follow link:
https://nts.strzibny.name/graphql-subscriptions-with-elixir-and-absinth/
I'm trying authenticate the user for…
I'm attempting to receive a string of JSON in my graphql implementation but keep getting errors with the custom scalar I've defined to handle the JSON.
I've defined a custom scalar to properly serialize the JSON to an elixir map. I'm getting errors…
I am trying to get users that were created before/after certain date and I get this error.
"message": "Argument \"filter\" has invalid value $filter.\nIn field \"insertedAfter\": Expected type \"NaiveDateTime\", found \"2018-05-13\".",
The error…
I have an account table that links to an emails table, roughly as follows:
Currently, my changeset on accounts uses cast_assoc to pull in the email:
|> cast_assoc(:emails, required: true, with: &Email.changeset(&1, &2))
But this means I need to…
New to Elixir/Phoenix and GraphQL. I have created a simple API that retrieves "drawings" from a PostgreSQL database. The table consists of an "id" (uuid) and "drawing_json" (text). In the table is one row with a json string of about 77Kb. My schema…
I'm using Absinthe and have a sign in mutation. When users send over valid credentials, I'd like to set a session cookie in the response via put_session.
The problem I'm facing is that I'm not able to access the conn from within a resolver function.…
I am getting a dialyzer error about unmatched returns of which I'm not sure how to properly address.
mix dialyzer --quiet
lib/my_app_web/router.ex:1:no_return
Function __checks__/0 has no local…
The Issue
There are a lot of guides available for handling error tuples in absinthe but next to zero for exceptions.
This is important because there are always unforseen issues which might raise an exception and return a response that will not…
I'm building a simple todo app using React, Apollo and react-apollo-hooks for hooks support, but the useSubscription hook doesnt fire.
I know the actual backend stuff works, because I have a graphiql app set up, and whenever I save a todo, the…
To be developed and deployed independently we want to decompose our schema into separate microservices within Erlang ecosystem using Elixir Absinthe, but it seems that they don't have ready this feature yet. So my question is.
Is it posible using…
I am getting unchecked dependency for environment error for ecto.create and ecto.migrate. I have below mix.exs file dependency entry
defp deps do
[{:phoenix, "~> 1.3"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_ecto, "~> 3.3"},
…
I use the built-in GraphiQL interface in Absinthe. As follows:
pipeline :browser do
plug RemoteIp, headers: ~w[x-forwarded-for], proxies: ~w[]
plug :accepts, ["html", "json"]
plug :fetch_session
plug :fetch_flash
plug…
What is the proper way to define fields that may not be accessible to all users.
For example, a general user can query the users and find out another users handle, but only admin users can find out their email address. The user type defines it as a…