►
From YouTube: FE Pairing - 20210305 - Unit test for actioncable_link
Description
In this video we write a unit test for an ApolloLink we've written to interface with rails action cable.
00:00 - Start!
05:00 - Paul starts sharing his screen :|
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43333#note_523177396
A
Send
your
dmr
okay,
I'm
recording
and
we
gotta
write
tests
for
a
branch
is,
is:
is
this
on
a
different
project,
or
is
this
just
a
module
in
our
main
repo.
B
A
main
repo
I
sent
you
the
link
to
the
mr
got
it
and
the
last
commit
adds
the
functionality.
C
D
B
But
maybe
natalya,
you
could
give
an
overview
what
this
is
actually
doing,
because
I
have
no
idea.
I
just
see
observable,
link
subscription
action,
cable,
graphql,
all
these
words
and
I
have
no
idea
what
they
mean.
D
This
is
actually
just
a
module
that
we
need
to
implement
the
graphql
subscription
for
ourselves,
and
previously
we
were
going
to
use
a
module
from
graphql
ruby,
but
apparently
we
have
issues
with
license
a
huge
issues,
thanks
to
lucas
who
discovered
this
and
that's
why
we
were
going
to
write
our
own
implementation,
but
then
heinrich
kind
of
decided
that
he
is
fine
on
himself
and
wrote
it
for
ourselves.
But
this
is
all
I
can
say
to
paul
and,
as
you
can
see
it's
using
observable,
so
you
should
be
happy
about.
A
D
A
Yeah,
this
looks
great
yeah
and
it's
observable
is
this:
just
like
rx
observables.
D
B
A
Yeah,
so
I
don't
know
I
don't
I
don't
know
if
our
unit
test
is
gonna,
do
anything
like
we
can
write
a
unit
test
for
us,
but
just
heads
up
it's
going
to
be
very
unit
testy
because
I
don't
think
we're
I'm
going
to
kind
of
just
ignore
that
we're
extending
apollo
link-
and
we
can
just
call
this
directly
unless
someone
has
more
context
and
knows
you
know
now.
This
is
how
we
can
trigger
this
method
with
something.
A
This
is
how
we
would
test
apollo
link
and
something
that
would
extend
apollo
link
because
I'm
guessing
this
overwrites
that
that
method.
So
I
was
planning
on
just
testing
this
class
method
directly,
but
there
might
be
a
more
sophisticated
way
with
someone
that
has
more
context
around
apollo
link
and
how
I.
A
B
We
have
the
startup
js,
which
is
apollo
link,
but
again
this
is
a
bit
differently
because
normally
apollo
link
is
like
in
you
can
che
chain
stuff
in
apollo
link
and
you
normally
just
pass
it
through
only
one
way
and
then
the
other
way
you
know
pass
it
through
as
well
right
like
so
it's
like
an
interceptor
chain
or
I
don't
know
how
you
want
to
call
it
wow
where
you
titles
observables
together,
but
this
is
basically
completely
replacing
the
normal
implementation
and
it's
just
like
hey
instead
of
using
http
or
websockets
or
whatever
else
method.
A
Okay,
so
where
do
we?
Where
do
we
use
thanks
for
thanks
for
letting
me
get
some
context
here?
Because
I'm?
Where
do
we
use
action?
Cable
link?
Oh
we're
we're
just
getting
we're
using
it
like
in
our
main
graphql
thing,
so
everything's
gonna
be
using
this
action
cabling
or.
B
So
it's
if
you,
if
you,
if
you
ex,
I
don't
know
what
would
you
mind,
sharing
your
screen?
That's
maybe
gosh.
A
A
B
So
if
you
open
the
graphql
js,
you
can
see
that
we
are
actually
splitting
based
on
some
condition.
So
if
our
graphql
query
contains
a
subscription
operation,
I
don't
know
how
this
actually
looks
in
a
graphql
query.
Then
we
use
the
new
one.
Otherwise
we
just
go
down
the
normal
flow,
so
this
is
actually
a
cool
thing
in
apollo
link
where
you
potentially
could
implement.
Even
something
like
hey.
I
want
you
know,
queries
to
use
this
apollo
link
chain
versus
this.
B
So
if
you
have
like
different
apollo
implementations,
different
endpoints
or
different
conflicts
for
whatever.
C
B
A
So
I
still
don't
have
a
whole
lot
of
context
here,
but
I
do
see
we
do
have
a
startup
js
link,
so
I'm
curious
how
we
tested
that
and
that's
the
thing
I'm
concerned
about
is
I
don't
want
to.
I
want
to
make
sure
we
test
it
in
the
context,
because
this
you
know
I
could
just
test
just
this
method,
but
then
you
know
yeah.
There's
the
mutation
test
would
reveal
that
removing
this
line
doesn't
break
my
tests,
and
so
I
didn't
do
this
the
right
way.
I
want
to
see
let's.
A
A
Yeah,
I
don't
know
so
I
I
don't
know
if
we
need
to
write
a
test
so
to
help
me
out.
I'm
I'm
driving,
but
I
need
some
navigators
help
me
out
should.
Should
I
be
worried
about
testing
this
in
the
context
of
apollo
link?
Are
we
cool
with
just
calling
requests?
Why.
C
G
I
think
if
we
follow
the
pattern
that
was
used
in
the
startup
js,
that's
sort
of
more
unit
testy,
but
because
the
graphql
file
also
has
this
split.
We
should
probably
have
a
test
for
that
as
well
sort
of
a
higher
level
integration
test.
I
think.
A
That
is
a
really
good
idea.
We
do
actually
I
mean
it's
our
front-end
integration
test
and
like,
like
they
technically
hit
that
so
we
have
like
implicitly
using
that
those
lines
are
covered,
but
I
don't
know
if
we
definitely
don't
have
a
good
value
coverage
for
those
probably.
B
Is
it
do
you
think
we
will
end
up
with
a
bunch
of
subscriptions
everywhere,
or
will
this
just
be
a
thing
that
we
use
from
time
to
time
because
right
now
we're
also
adding,
like
all
the
code,
that's
around
this
every
to
the
graphql
js
bundle,
so
it's
loaded
on
every
graphql
js
page,
but
you
know
right
now.
Only
one
page
is
actually
using
the
subscription
feature
and
it
feels
like.
Maybe
my
question
is
basically:
should
we
have
like
a
different
graphql?
B
I
don't
know
how
do
we
call
it
when
we
set
up
the
graphql
setup,
or
should
it
be
maybe
a
boolean
in
the
setup
to
say
hey?
I
want
this
with
subscription
support
or
without
or
something
like
that.
D
Eventually,
there
will
be
a
bunch
of
graphql
subscriptions
because
real-time
updates
are
planned
for
the
whole
sidebar
thing
for
any
kind
of
issuable.
So
this
is
already
a
good
part
of
gitlab.
I
mean
issuable
is
issue
margin,
quest
epic
incident.
Whatever
else
and
from
what
I
know
the
plans
are
to
extend
the
real
time.
The
question
is
like
how
much
time
this
will
take,
because
currently
we
have
only
one
subscription
and
just
to
add
to
this
subscriptions
will
be
fine-grained,
so
we're
not
subscribing
to
updating
issues.
D
We
will
subscribe
to
updating
assignees
separately
reviewers,
whatever
else
so
it's
up
to
you.
We
can
optimize
it
right
now
and.
G
As
well,
because
you
know
how
much
is
this
going
to
increase
the
main.
B
Slide
yeah
it
so
the
bundle
size
analysis
currently
says
that
our
average
javascript
size
increases
by
20
kilobytes.
But,
to
be
honest,
like
I
think,
it's
still,
okay,
because
this
will
all
be-
or
we
should
check
later
on-
that
is
all
part
of
the
graphql
js
bundle.
And
then
it's
not
like
you
know.
If
the
graphql
js
functionality
is
a
little
larger
than
so
be
it
right
because
it
will
hopefully
be
cached
once
you
hit
the
first
page
that
has
the
yeah
yeah.
G
B
B
Observables
they
should
be
async,
so
you
could
also,
in
the
observable,
have
like
something
like
the
cable
import
right.
Have
it
here?
Yes,
potentially,
but
I
don't.
B
A
Yeah,
that's
new!
That's
interesting!
Okay!
I
yeah.
I
think
I
let's,
let's
get
to
let's
put
some
code
down,
but
I'm
I'm
I'm
stomping
myself,
because
my
instinct
is
telling
me
hey.
I'm
just
gonna
start
mocking
things.
I
don't
understand,
so
we
can
just
unit
test
this
thing
and
so
one
of
them
being
you
know,
hey
we're
going
to
create
a
subscription,
and
I
want
to
really
capture
these
things
that
we've
ended
up
creating.
C
A
I
guess,
but
someone
stopped
me
before
I
do
it.
I
guess
I
don't
need
to
mock
it,
but
I
guess
I
do
want
to
just
spy
on
it.
A
A
Okay
and
let
me
just
stop
declaring
a
variable
up
there-
oh
yeah,
I
was
going
to
create
this
thing
yeah,
let's
create
action,
cable
link
and
I
think
I
just
got
to
do
new
action,
cable
link.
That
was
easy
and
I
think
for
me
to
do
this
bit.
I
think
I
am
going
to
need
to
spy
on
subscriptions,
create.
A
A
A
Cool
so
when
I
call
requests
with
oh
here's,
an
operation
that
takes
oh
yeah,
query
variable
software,
okay,
and
we
could
just
create
a
little
query
here
unless
there's
a
more
sophisticated
way
to
create
query.
But
I'm
just
gonna
create
a
little
a
silly
query.
B
What
does
graphql
print
actually
do?
B
A
Oh
yeah,
it
takes
an
asp,
node
and
returns
as
a
string
good.
I
yeah
so
we'll
just
give
it
the
lovely,
abstract,
syntax
tree,
that's
empty
and
we'll
see
what
happens.
Print
will
probably
blow
up
and
we'll
we
can.
We
can
end
up.
Maybe
we
could
just
import
a
query
here
to
use
that
would
be
interesting
too.
All
right
we're
going
to
create
a
subscription.
I
really
just
want
to
get
my
feedback
loop
going.
A
So
I'm
going
to
create
my
cable
link
and
I
am
going
to
do
my
act,
which
is
request.
A
A
Now
all
right
something
blew
up,
which
is
surprising,
because
I
really
thought
it
would
be
called.
Oh
well,
it's
not
called
because
our
observer.
D
Yes,
any
observable.
C
A
So
correct
me:
if
I'm
wrong
italia,
because
I
haven't
I
haven't-
I
haven't
delved
in
the
rx
magic
in
a
while,
but
there
is-
and
this
isn't
rx
but
the
principles
apply.
There's
hot
observables.
That
would
run
this
right
away
and
you're
subscribing
to
there's
a
single
thing.
That's
triggering
things
and
you're
all
going
to
try
to
subscribe.
To
that.
One
thing
then
there's
cold
observables
that
are
going
to
be
triggered
every
time.
Something
subscribes.
A
A
Let's
do
it
so
here's
our
observable
and
yeah,
let's
subscribe
to
it,
and-
and
I
have
some
thoughts
diving
in
my
head
of
how
we
can
make
it
more
complex,
but
I
won't
do
that
yet
so
we're
gonna
subscribe
to
it
and
I'm
gonna
pass
a
done
callback
because
we're
not
gonna
be
done
until
all
this
stuff
is
done.
A
Yes,
and
and
and
and
rx,
does
these
kind
of
patterns
like
like
you
could
do
they
have
a
lot
of
cool
helpers
for
just
and
that's
one
of
the
cool
things
about
observable
abstractions
is,
is
it's
a
nice
abstraction
and
I
think
we
can
a
promise
can
also
kind
of
you
can't
translate
an
observable
to
a
promise
and
we
could
make
that
make
our
tests
a
little
bit
more
readable.
It's.
B
B
The
js
link
stuff
does
the
same
thing.
So,
okay,
there
you
go.
A
Well,
we're
getting
what
I
don't
know
about,
because
this
is
an
rx
do
I
have
to
pass
like
an
object
here
that
has
next
error
and,
like
all
the
different
callbacks,
or
do
I
pass
okay?
Yes,.
D
C
G
Startup
js
link
spec
just
passes
a
callback
to
subscribe
directly
without
sort
of
next
on
error
and
so
on,
which.
G
B
G
Yeah,
I
guess
apollo
link
dot
from
basically,
it
looks
like
it
sort
of
composes
a
series
of
links.
A
Oh
yeah,
so
this
thing
blew
up
because
it's
not
a
yes.
How
does
anyone
know?
I
can
get
one
of
those
sweet
ast
nodes.
G
If
you,
if
you
do,
we
probably
want
to
do
a
graphql
tag
like
we
can,
where
is
it
called
the
cql
tag.
D
G
A
G
Yeah
gql,
so,
rather
than
brackets,
it's
backticks
use.
D
It
as
a
template
or
poll
so
just
without
brackets,
just
backticks.
A
A
The
syntax
was
like
okay,
I
get
it,
it's
actually
doing
it.
Okay,
that's
cool!
So
I'm
gonna
query,
oh
wait,
but
I'm
in
a
all
right,
yeah,
I'm
tripping
right
now,
but
that's
okay.
I
forgot
what
graphql
things
look
like.
So
I'm
just
gonna
look
at
one:
okay,
we're
gonna,
call
it
cory!
A
A
E
A
A
A
B
A
Yeah
and
that's
that's,
that's
what
I'm
not
entirely
sure
about
the
how
to
do
that
with
action.
Cable
and
I
love
to
explore
it
or
we
could
be
very
unit
testy
about
it.
B
I'm
at
leipzig,
germany,
but
oh
okay,.
B
Yes,
we
lost
nico,
I
don't
know
I'm
I
I'm
not
a
you
know.
The
question
is
like
the
unit
tests
are
fine
right,
like
hey
whatever,
and
I
think
to
be
honest,
like
the
simplicity
of
this
interface,
I
would
just
be
like
hey,
let's,
let's
check
those
three
cases
that
we
basically
have
here
in
between
line
19
and
30
right
like
if
I
would
mock
the
cable
subscription
that
gets
created.
That's
what
I'm
trying
to
say.
B
So,
basically,
I
would
implement
something
that
works
like
whatever
cable
subscriptions
create.
I
assume
it
returns
a
subscription.
I
would
basically
implement
a
subscription.
You
know
a
mock
subscription
which
we
then
can
trigger
receive
on
or,
however,
this
works
right
that
this
callback
gets
executed.
It's
a
callback.
Is
it
a
callback
yeah?
It's
a
callback.
A
Right
so
yeah,
and-
and
so
but
what's
interesting,
is
like
that's
actually
not
necessarily
part
of
what's
returned
like
we
would
want
to
spy
on
what
work
we'd
spy
capture
that
argument
that
we
got
called
with
and
then
we
would
manually
call
whatever
we
got
called
with
here
and
that's
fine.
There
is
a
way
and
there's
a
more
preferable
way
of
doing
it
if,
if
we
knew
and
and
I
and
I
don't
and
we
could
dive
into
it
as
well-
and
I'm
happy
doing
that,
but
if
we
knew
oh
this
is
this
kind
of
object.
A
Here's
how
you
can
trigger
that
being
called
through
this,
this
rails,
cable
stuff,
but
I
but
maybe
that's
not
as
intuitive
and
so.
A
B
A
B
G
G
A
A
Right
but
yeah,
so
so
we
can
look
at
you
know
hey
when
we,
where
do
we
get
subscriptions,
here's
our
subscriptions,
the
prototype,
that's
doing
create
we're
creating
a
subscription,
we're
adding
it
great,
and
so,
where
are
we
actually
triggering
these
things?
A
It
looks
like
there's
over
here
where
we
do
notify
might
be
where
we're
actually
triggering
them.
So
I
can
see
what's
calling
notify-
and
this
is
my
very
naive
I've-
I
don't
really
know
exactly
what's
going
on,
but
I'm
kind
of
reverse
engineering.
What's
going
on.
A
Yeah,
I
think
I
think
action
cable's
doing
something
for
sure,
and
we
can
also
just
start
using
it
and
start
resolving
errors.
B
Yes,
so
apparently
it
you
know
triggers
like
events,
so
it
looks
at
all
it
looks
at
you
know.
The
subscriptions
is
basically
a
list
of
subscriptions
and
then
you
know
basically
all
of
them
get
notified
with
the
stuff
that
came
from
the
back
end,
so
subscriptions
notify
what
the
heck.
A
Yeah,
and
so
I
think
here,
let's
look
for
events.
A
B
No,
that
sounds
too
complicated,
because
the
thing
that
we've
basically
creating
a
subscription
and
the
subscription
is
added
to
an
internal
array
right
and
then
later
on,
the
connection
send
something
to
the
active
subscription.
So
I
don't
know
in
this
compile
file
where
you
are.
But
if
you,
if
you
have
a
look
here,
oh
yeah
in
this.
B
B
Check
it
out
yeah,
it's
always
bad
when
you
screen
share
right,
like
if
you
scroll
really
down
like
there's,
this
notify
notify
function,
right,
yep
and
so
what
the
notified
sorry
yep,
what
the
notify
does
in
line.
80
is
like
it
just
iterates
over
all
the
subscriptions
and
if
there
is
a
callback
name
right
in
our
case,
the
callback
name
is
received
that
matches
the
callback.
It
just
sends
executes
that
function
with
the
argument-
and
I.
A
Think
using
notify
would
be
cool
yeah
and
that
way
we
don't
have
to
do
some
fancy
spy
like
and
capturing
what
we
did
it
we
can.
We
could
be
a
little
bit
more
closely
tied
to
this.
What
I
would
be
concerned
about
is
like
if
this
isn't
and
there's
nothing
indicating
this.
So
that's
why
I
feel
fine,
but
if
this
wasn't
like
a
public
module
of
this
package,
we're
consuming
like
we
don't
want
to
access
internals
here
too
much.
A
We
only
want
to
interface
with
its
api,
but
I
think
this
would
be
fine.
Does
anyone
else
have
any
other
feelings
or
thoughts
about
it?
Does
the.
D
A
C
G
B
But
then
we
suddenly
need
to
worry
about
how
the
action
cable
consumes
web
sockets
and
what
they
do
with
them
right,
because
if
that
ever
changes
and
the
rails
api
changes-
and
you
know,
then
suddenly-
we
would
need
to
adjust
our
front
end.
But
if
the
javascript
api,
that
we're
consuming
doesn't
change
with
the
notify
and
so
on,
you
know
it
could,
I
don't
know,
use
you
know
pigeons
for
transport
and
not
web
sockets
yeah.
A
On
the
other
hand,
the
trade-off
is,
and
we
could
we
can
stop
talking
about
it,
but
if
they
did
change
something
and
we
migrated
to
that,
our
tests
should
still
pass.
We
wouldn't
have
to
rewrite
them.
When
we
do
very
unit
testy,
our
tests
become
a
little
bit
more
brittle
like
so.
A
That's
why,
like
you
know,
hey
yeah
testing
it
from
that
perspective,
can
be
nice
because
that's
how
it's
actually
going
to
be
used
and
we're
just
concerned
about
actually
that
that
o
of
it
from
that
perspective,
but
I
don't-
I
think
that
would
be
nice,
but
the
level
of
effort,
because
this
is
new,
especially
new
territory
and
domain
for
for
for
me
to
explore-
may
not
be
worth
it
right
now.
A
That's
that's
where
I'm
at,
but
that's
just
me,
but
I
am
gonna
call
notify
unless
someone
someone
stops
me-
and
I
would
highly
recommend
doing
that
at
some
point
cool,
so
we
created
a
subscription,
but
I
really
want
to
see
what
were
we
created
with,
because
we
passed
a
couple
of
parameters
in
there,
but
let
me
do
on.
Let
me
create
this
to
do
for
on
subscription
notify
what
happens,
because
that's
gonna
be
important.
Okay,
oh
man.
We
got
this.
E
A
B
A
All
right,
that's
as
good
as
it
gets:
okay,
cool,
but
now
we're
concerned
about
this
bit
and
that
sounds
cool.
So.
B
A
Yeah,
I
think
we
can
call
cable
subscriptions,
notify
and
then
yes
that
I'm
assuming
hits
received
so
well-
hopefully
that's
the
case
and
then
we
can.
We
can
look
at
what
happens
with
our
observer
that
we
passed
to
all
of
this,
so
it
should
work
out.
But
I'm
gonna
add
a
nice
little
console
log
here,
saying:
hey,
I'm
hit.
A
Okay,
let's
check
it
out,
so
I
I
feel
like
there's
an
opportunity
to
put
some
things
in
a
before
each,
but
I'm
not
gonna
worry
about
it.
Actually,
I
kind
of
really
want
to
now.
A
That's
good
yeah,
so
this
is
all
the
same.
C
A
I
think
I
kind
of
really
do
so
we'll
see
I'm
gonna
leave
it.
I
think
I
do
oh
gosh.
Look
at
that.
How
look
how
look
how
silly
I
was.
C
A
C
A
Okay,
so
cables
subscribe
yeah.
So
now
the
act
is
gonna,
be
yeah.
Cable
subscriptions,
notify
whoa,
that's
not
the
right
thing
notify
subscription
and
if
it's
this.
A
Where
to
see
you
thieved,
okay,
okay,
we're
just
gonna
pass
silly
to
it.
Let's
see
what
happens
yeah
so
now.
I
would
expect
on
next
to
happen.
That
would
be
the
next
thing,
but
I'm
not
surprised
it's
just
blowing
up
and
I
wasn't
hit.
We
could
debug
this
and
dive
into
it.
B
B
D
A
That
they're
using
nonce
in
a
way
that's
confusing,
no
identify.
C
A
Though
you
know
it's
I
like
like
it's
quite
you
know
this
is.
I
was
able
to
navigate
pretty
nicely
like
as
far
as
front
end
code
goes.
Maybe
this:
maybe
the
fact
that
this
isn't
super
sophisticated
is
actually
kind
of
nice,
but
but
yeah,
that's
that's
a
little
wild,
and
so
I
wonder
if
I
guess
we
can
get
the
identifier
from
what
we
pass
here.
Maybe.
G
Let's
see
the
params
it
looks
like
is
simply
either
the
channel,
which
is
the
channel
name,
pass
to
create,
or
it's
an
object
with
the
channel
in
it.
So
if
you
go
to
yeah.
B
We
should
we
go
to
the
should
we
just
go
into
the
compiled
source
code,
that
is
on
paul's
machine
and
add
a
console
log
into
the
identifier
to
know
what
it's
logging
sure
you
guys
feel
free
to
come
over
and
do
that
yeah.
Let's
do.
A
It
yeah
so
I'm
here
and
I
hit
subscribe
subscription.
B
There
must
be
like
subscriptions
so
yeah
send
perform
this
identifier.
I
saw
it,
I
saw
it.
Oh
you
found
it,
you
saw
it
yes
line
343.
A
A
Yeah
and
it
has
the
nonce-
hence
it's
an
identifier,
okay
and
that's
actually
not
we
can.
We
can
capture
this
still
and
that's
fine,
so
I'm
gonna
create
a
nice
little
function.
Could
we
just
change
the
identifier
of.
A
B
We
have
an
alternative
instead
of
notify.
We
could
just
call
notify
all
and
it
will
get
the
thing
they
have
a
notify
all
method.
Let's
do
that
instead.
B
B
A
That's
great!
Well
let
me
let
me
leave
this
one.
I
meant
to
clear
out
the
other
one,
okay
yeah.
So
how
can
I
get
rid
of
my?
I
guess.
I
need
to
hit
unsubscribe
on
every
one
that
I've
created
here.
Every
observable
that
I've
created
I
should
on.
I
should
unsubscribe
and
that's
all
that
sounds
like
you
should
put
it
in
after
each
right.
That's
what
I'm
thinking!
That's
what
I'm
thinking
you
can
move
observable
to
be
a
global
thingy.
A
A
A
A
If
I've
already
created
observable,
cannot
create
or
observable
already
exists.
A
Okay,
so
now
we
go
here
boom
observable
equals
cable
link,
request
we'll
pass
in
the
operation.
A
C
A
Request
from
our
operation
great-
and
here
we're
going
to
do
the
same
thing.
B
It's
nice,
the
unsubscribe
is
not
it's
it's
funny.
I
don't
know
if
you
even
have
access
to
the
unsubscribe,
because
it's
returning
an
observable
which
is
returning
a
thing.
So
I
think
you
know.
A
From
observables
you
unsubscribe
from
subscriptions
and
that's
what
this
is.
A
Yes,
you're,
so
right?
Yes!
Yes!
Yes!
Yes!
Yes!
Yes!
Yes!
Yes!
Thank
you
you're!
So
right
man,
this!
This
is.
This
is
why
I'm
I'm
glad
we're
pairing,
I'm
glad
you're
here
ip.
A
Maybe
I
I
might
be,
I
might
need
to
do
that,
but
we'll
we
will
see.
Let
me
let
me
do
this
first.
Yes,.
A
B
B
A
I
I
was
not
listening
to
you
the
last
minute.
I'm
sorry,
no.
B
It's
it's
fine.
I
can
repeat
myself
so
in
the
action
cable
link
line,
27
yeah
well,.
C
B
Wait,
do
you
mean
this
one?
Yes,
so
you
know
we.
If
no
data
this
to
me
seems
like
hey
the
subscription
is
over
we're
not
sending
any
data
anymore
on
that
graphql
subscription
query
right.
That's
when
you
are
completely
observable,
but
we
don't
clean
up
the
subscription
in
that
case.
So
you
know
if
you
create
a
bunch
of
subscriptions
on
one
page
and
even
if
their
subscriptions
are
closed
at
some
point
you
you
will
basically
retain
the
cable
subscription
stuff
in
memory
right.
This
is
a
really
great
idea,
so.
A
I
think
we
should
create
a
test
for
subscription.
A
Yep,
when,
when
is
this,
is
this
a
desirable.
E
D
What
is
go,
what
is
going
on
complete
uncomplete
only
means
that
no
data
will
be
delivered
to
subscribers
anymore,
even
if
they
exist.
At
this
moment
they
will
receive
no
data,
but
this
doesn't
mean.
A
Unsubscription,
do
we
need
to
clean
up?
Do
you
think
we
should
use?
Do
we
need
to
clean
up?
Because
we've
created
a
side
effect
here,
and
this
is
only
getting
clean
up
when
we
unsubscribe
so
should
we
clean
it
up
on
complete,
probably.
B
A
B
E
A
Right
and
that's
what
okay,
I
don't
know
if
you
could
do
that
with
rx
observables.
I
think
I
think
once
you
unsubscribe,
I
don't
think
you
can
re-subscribe.
I
think
well.
B
B
So
if
I'm
switching,
you
know
and
I'm
subscribing
to
a
chinese
of
issue
number
one,
I'm
navigating
to
issue
number
two,
I'm
now
subscribing
to
the
sines
of
issue
number
two,
but
we
currently
don't
have
anything
that
automatically
like
cleans
up
this
first
subscription,
so
you
will
still
get
stuff
via
web
sockets.
A
A
Yeah
that
only
gets
triggered
if
you
manually
unsubscribe,
not
if
we're
just
done.
What
is
a
good
question
would
be:
does
cable
action,
cable
underlying
subscription
thing
when
we
don't
receive
any
more
data?
Does
it
know
I
can
be
done
now?
That
would
be
a
good
question
to
ask
and
if
it
doesn't,
I
think
it
makes
a
lot
of
sense
to
say
we're
done
now
and
we're
gonna
be
really
done
like
I
think
that
makes
a
lot
of
sense.
I
mean
I
have
no
idea
how
this
works
right.
A
So
I
wonder,
like
does
observer
completely
get
called,
and
it's
a
really
good
thing-
we're
not
overly
mocking
things
out,
because
I
think
we
can
actually
test
this,
probably
in
a
later
a
later
period,
but.
G
So
I
was
just
taking
a
look
at
the
implementation
in
apollo
link
upstream
and
their
websockets
transport
is
written
in
a
very
similar
way,
so
they
are
on
line
210
in
the
file
that
I
linked
there
in
zooming
chat.
G
They
don't
do
anything
when
the
observer
completes
they
just
return
and
unsubscribe.
So
I
think
I
have
a
feeling
that
the
unsubscription
is
just
sort
of
handled
by
apollo
automatically
somehow,
unless
they
do,
they
do
have
this
execute
operation,
which
could
be
something
else.
A
A
We
got
our
on
next
great.
So
now,
let's
check
out,
if
there's
an
error.
B
Oops
and
we
should
have
like
multiple
thingies
as
well
right,
like
multi,
like
sending
data
multiple
times,
because
that's
the
whole
purpose
of
the
websocket
itself
right
sure.
A
Yeah,
we
can
do
it,
let's
do
it
here.
I
think
it's
called
auroras
as
well.
Sorry,
I
think
you're
totally
right
errors.
D
A
Yeah,
so
this
this
double,
this
double
call
didn't
didn't
do
what
I
thought
it
would
do.
So
that's
interesting.
A
I
think
it's
actually
all
synchronous
is
there.
A
It
might
not
be
when
I
don't
know
what
to
wait
for
just
wait.
A
I'm
gonna
have
to
speaking
of
the
bounce.
I'm
gonna
have
to
bounce
in
a
little
bit.
Yes,
and
I
will
create
a
new
branch
and
push
this
up
and
mention
it
in
that,
mr
and
mention
all
of
the
the
lovely
navigators
I
had
to.
A
A
Yeah
this
this
isn't
doing
what
we
think.
It's
doing,
I
don't
know
that's
a
thing
to
solve
so
yeah.
That's
fine!.
A
All
right
cool:
well,
hey
thanks!
Thanks
everyone
for
hopping
on
and
being
flexible.
Let
me
struggle
through
this
a
little
bit.
I
will
commit
this
and
push
it
to
a
new
branch
and
ping
on
that.
Mr,
so
thanks,
everybody
cool
sounds
great.