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
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
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.
Popular in Discussions
Other popular topics
Chat & Discussions>Discussions
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









