slouchpie

slouchpie

Absinthe subscriptions - do they cache something?

This is not a question. I am just sharing a facet of my experience with Absinthe subscriptions.

Today I was “hackathon”-level coding a new graphQL API with a friend using Phoenix+Absinthe.

I am using subscriptions in Absinthe a lot and I noticed something strange happening.

I would have failing test for subscriptions and I would not know why it was failing. So, i would put IO.inspect in the subscription config and trigger functions to inspect the args.

When i do this, the tests pass!

I have seen this before using Elixir/Phoenix - my tests fail and when I try to observe actual values, they start to pass.

I feels like Schroedinger’s cat - when I observe the values, they actually take a value ( I have seen this happening before with System.env calls).

Does anyone else experience this with Elixir? Maybe it’s a Phoenix thing? I rarely use Elixir without Phoenix.

Sorry if this topic is too vague but I have no strong evidence of the problem (it’s not really a big problem, just a small inconvenience) and I am wondering if anyone else sees this happening sometimes.

also Merry Christmas everyone, I hope nobody is too cold this winter.

First Post!

slouchpie

slouchpie

i just want to confirm this experience.

I wrote a new test for a new subscription.

i ran it once and it failed.
i ran it again after changing NOTHING and it passed.

Elixir caches values somewhere and i wish I could see it

Last Post!

slouchpie

slouchpie

I think it will be hard to reproduce. I cannot reliably reproduce it. I only see it when i am developing - writing new types/mutations/subscriptions.

Where Next?

Popular in Discussions Top

und0ck3d
Hello everyone! A few days ago I’ve created a topic here about how people were creating CMSs with Elixir and Phoenix. I’ve been studying...
New
lorenzo
Hey everone! I created a prototype for my app using Nodejs for the api. But the framework I chose wasnt great (in general theresnt any g...
New
AstonJ
If so I (and hopefully others!) might have some tips for you :slight_smile: But first, please say which area you’re finding most challen...
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New
marciol
Please, let me know if this kind of discussion already took place in another topic . Hi all, how do you consider if is better to build ...
New
mmmrrr
Just saw that dhh announced https://hotwire.dev/ Is it just me or is this essentially live view? :smiley: Although I like the “iFrame-e...
New
matthias_toepp
I’d love to hear what people think about Wisp, the new Gleam web framework started by Gleam’s primary creator Louis Pilfold. Gleam, alon...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44265 214
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement