Questions tagged [absinthe]

For issues relating to the Absinthe GraphQL implementation for Elixir.

Absinthe is an implementation for going far beyond GraphQL specification basics.

83 questions
1
vote
0 answers

AWS S3 signature does not match error when pushing image to bucket using presigned url

In a React Native application with an Elixir/Phoenix back end I am attempting to have a user create a photo that will push to an S3 bucket using an AWS presigned url. I am using the Hex package ex_aws to expose the API. While I am relatively new to…
1
vote
0 answers

How to tell Absinthe it should issue a query to send an update for an outstanding subscription?

I'm running an Absinthe GraphQL server which queries a backend, but there are also events coming in from outside (over AMQP), indicating an update has happened (some of which do not include the updated record info). I can handle the events that…
raarts
  • 2,711
  • 4
  • 25
  • 45
1
vote
1 answer

How do I set up an Absinthe schema with field names different than underlying Ecto field names?

For example, I'd like to call the inserted_on timestamp created_at in the front end in the following Absinthe schema: defmodule MyAppWeb.Schema.AccountTypes do use Absinthe.Schema.Notation object :user do field :id, :id field :email,…
Michael Johnston
  • 5,298
  • 1
  • 29
  • 37
1
vote
2 answers

How to 'mock' some GraphQL requests while forwarding the rest to an existing GraphQL server?

Question: Is there a way to mock some GraphQL types/queries/mutations/subscriptions while 'forwarding' the rest to an existing GraphQL server? Situation: The application has a schema, part of which has been implemented on the server and the rest is…
Kul
  • 1,239
  • 8
  • 18
1
vote
1 answer

More advanced :assoc with elixir absinthe

My blog app has a Post model that has many Comments. schema "post" do field :title, :string field :content, :string belongs_to :owner, MyApp.Accounts.User, foreign_key: :owner_id has_many :comments, MyApp.Content.Comment, foreign_key:…
Mark Karavan
  • 2,654
  • 1
  • 18
  • 38
0
votes
0 answers

Elixir Absinthe app with Task timeout that I can't find

I've got a big phoenix project using absinthe and on the graphql call, I get the error if the request takes longer than 5s #PID<0.8144.0> running RLWeb.Endpoint (connection #PID<0.8143.0>, stream id 1) terminated Server: app.com:80 (http) Request:…
atomkirk
  • 3,701
  • 27
  • 30
0
votes
1 answer

Elixir Ecto query multiple tables with args from Absinthe

I'm currently working in a project using GraphQL with Absinthe. I have a problem with the query of multiple tables which has an arg (recieve from GraphQL variables) in the WHERE clause. I want my SQL to be like this: SELECT p.* FROM posts p JOIN…
0
votes
1 answer

(CompileError) invalid quoted expression

I'm stumped trying to debug this I'm trying to upgrade elixir from 1.7 -> 1.13 along with some dependencies. I incrementally bumped versions to get to this point. Anyone know of any breaking changes in how absinthe does scalars? related question.…
Geoff Langenderfer
  • 746
  • 1
  • 9
  • 21
0
votes
2 answers

absinthe - how to parse nested field from custom type

I want to have a custom GeoPoint type in my schema and I can't find any example how to do this in a schema types file. The only way I found was using the input_object in the schema file. Is it possible to do it this way using…
Daniel Kukula
  • 333
  • 3
  • 7
0
votes
2 answers

Absinthe middleware not applying/running on query

I have Absinthe middleware that checks the context for an authenticated user, like so: defmodule CliftonWeb.Middlewares.CheckAuth do @behaviour Absinthe.Middleware require Logger def call(resolution, _config) do case resolution.context…
Tom Haines
  • 123
  • 3
  • 9
0
votes
1 answer

Elixir Phoenix Absinthe GraphQL API authentication in both web and mobile app's

I'm working on an Absinthe GraphQL API for my app. I'm still learning the procedure(so please go easy on me). I've a Absinthe/GraphQL MyAppWeb.schema.ex file in which I use for my queries and mutations. My question is how do I use this API for…
0
votes
1 answer

Fail to import Phoenix npm package in overmind graphql

I re-installed all node modules using npm install run into the error: Cannot find module 'phoenix' from 'node_modules/@absinthe/socket/compat/cjs/index.js' It fails first in the @absinthe code: require('phoenix'); in…
holger
  • 382
  • 1
  • 6
  • 13
0
votes
1 answer

Get ArgumentError ets.lookup in Absinthe Middleware using FunWithFlags

I’m trying to use FunWithFlags.enabled? (ref fwf) inside an absinthe middleware/3 callback but I got the following error: (ArgumentError) argument error (stdlib) :ets.lookup(:fun_with_flags_cache, :some_flag) Stacktrace: │…
catra
  • 178
  • 2
  • 11
0
votes
1 answer

Send a downloadable file in API response using grahql in phoenix framework (absinthe)

I am currently sending json string in response to an API request in graphql using absinthe. The schema for it looks like this: object :export_data do field :resp_data, :json end I want to now send a downloadable json file instead of a json…
Archit Verma
  • 1,911
  • 5
  • 28
  • 46
0
votes
1 answer

Absinthe returns an array that contains one null value instead of an empty array

I am confused by this behavior that I'm seeing with Absinthe. For a top-level field, e.g. field :projects, list_of(:project) do arg :user_id, :string resolve(&ProjectResolver.list_projects/2) end If…
xji
  • 7,341
  • 4
  • 40
  • 61