►
Description
In this session we pick up on an old effort and flesh out a helper that adapts graphql-mock-factory. This helper will enable us to remove a lot of duplication caused by creating mock data **and** improve the strength of our tests since it's all based on the schema.
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57629/
graphql-mock-factory: https://www.npmjs.com/package/graphql-mock-factory
A
Report
on
this,
okay,
so
me
and
nathan
friend
here-
are
checking
out
this.
Mr
we
started
looking
into
or
we
started
putting
together
to
replace
how
we
have
been
manually,
creating
graphql
mocks,
but
we
would
be
able
to
dynamically,
create
them
based
on
the
quarry
right.
B
A
Yeah,
that
sounds
really
awesome,
so
I'm
gonna
try
to
reorient
reorient
myself
where
we
were
at
here.
So
this
is
the
old
diff.
B
Yeah,
so
what
we
yeah,
so
this
was
used.
This
used
to
be
a
mock
day.
That's
just
like
a
a
hard-coded
json
object
that
we
used
in
the
test
so
now
we're
moving
to
generating
it
dynamically
using
our
schema.
So
this
is
one
thing
that's
I
know
has
changed
since
we
last
looked
at
this
is
we've
moved
this
file.
We
should
have.
B
B
A
Well,
and
but
that
brings
up
well,
so
what
do
you
think
of
that?
I
guess
it's
kind
of
like
our
fixtures,
because
now
we
we
have
an
auto-generated
thing
that
we're
requiring.
So
I
guess
just
like
we
have
good
json
fixture.
Maybe
we
should
have
a
helper
for
get
get
lab
schema
that
blows
up
at,
but
I
would
say
it
needs
to
blow
up
at
run
time.
That's
the
thing
is
rather
than
blowing
up.
A
We
don't
want
it
to
blow
up
at
compile
time,
because
then
no
one's
gonna
be
able
to
right,
build
like
run
any
any
test.
I
think
we
wanted
to
blow
up
at
run
time.
We
couldn't
get
this
thing.
B
A
Yeah,
so
that's
that's
one
step
and
then
I'm
noticing.
A
B
B
Oh,
you
know
why,
because
we're
not
using
this
below
to
do
replace,
and
I
think
it's
because
we
needed
yeah
we
needed
a
way
to
this-
just
gives
us
the
query
itself
and
then
we
need
to
like,
like
hydrate
it
with
the
variables
that
we're
using,
and
we
didn't,
we
kind
of
ran
out
of
time.
So
we
skipped
that
step.
B
A
Do
we
think
that
that's
is
that
part
of
the
just
the
api
you
think.
A
I'm
looking
at
the
api
for
graphql
mock
factory.
B
A
Yeah
yeah,
I
think
yeah,
so
look
at
this.
I'm
gonna
share
it
in
our
chat.
Let
me
actually
get
you
to
the
to
the
very
the
very.
Let
me
get
you
the
anchor
as
well.
B
C
A
A
Right
about
that,
did
you
get,
did
you
did
it
open
up?
Oh,
it
looks
like
it's
the
tab.
Next
to
your
new
tab,.
A
Well,
I
sent
you
to
here,
so
don't
don't
go
looking
for
my
chat
because
you're
here,
if
you
go
down
to
the
api
reference
and
keep
going
down,
go
to
mock
server
and
keep
going
down.
A
C
A
A
Yes,
so
we'll
see,
it'll
probably
be
in
the
same.
It'll
probably
be
in
a
sibling
directly.
E
A
Yeah
looks
good
great,
so
let's
try
replacing
line
32s
cory
with
the
one
that
we're
importing.
A
D
C
A
It
is
great,
so,
let's
take
let's
pass
full
path,
full
path
as
the
second,
let's
pass,
sorry
just
like
what
we
have
on
line
22,
we're
passing
our
argument,
our
variable
full
path
and
we're
giving
it
the
value
full
path.
Yeah,
let's
do
that
here.
Do
you
think
is
it
I
think
it's
trying.
B
E
C
A
It
does
not,
can
we
console.log
what
group
package
settings
mock
is.
A
B
B
A
A
C
A
B
A
We're
good
this
glorious
object
when
we
import
a
graphql
module,
but
it
looks
like
this
function
was
expecting
a
string.
Okay,.
B
A
I
think
our
just
resolver
is
resolving
all
graphql
endpoints
as
it's
parsing
through
it.
This
way
for.
D
A
A
Your
your
organization
skills
are
clutch
man,
the
dual
window
usage.
Yes,
so,
okay,
yeah
yeah
go
down
too
so
we're
creating
a
mock
apollo
yeah.
Yes,
yes,
and
then
we're
passing
a
resolver
there.
Okay,.
A
A
A
I
don't
know,
do
we
want
to
pass?
Do
we
want
to
make
line
20,
actually
a
function
and
pass
through
the
variables
and
we
can
even
pass
through?
Like
I
mean
we
can
we
can
pass
all
of
this
through,
like
you
even
see
the
queries
right
there,
you
know
what
I
mean
yeah
right.
B
A
And
and
then
now
maybe
it's
like
super
reusable,
I
don't
know.
A
Let
me
think
yeah,
like
you,
look
at
line
33
on
the
left
window
and
we
have
line
21
on
the
right
window.
Like
that's
duplicating
itself.
We
are
also
not
using
the
right
the
real
variables
that
we're
using
in
our
tests,
we've
just
hard
coded
some
variables
to
generate
all
this.
I
kind
of
wonder
if,
for
these
apollo
request
handlers,
we
just
need
to
pipe
them
now
to
this
mock
server
and-
and
so
maybe
we
can
just
export
a
helper
and
just
have
one
helper,
that's
shared
by
all
the
tests.
A
Where
you
just
say
hey
give
me
your
give
me
your
query
and
variables
and
we
can
whatever
rest
args
and
we
can
return
it.
And
now
this
module
on
the
right
side
is
very
domain
agnostic
because
it's
just
other
than
I
don't
know
what
to
do
with
the
mocks,
but
that's
that's
its
own.
That
was
wondering
too,
because
this
is
specific
to
this
query.
B
A
Maybe
yeah,
maybe
maybe
we
also
want
to
just
allow
the
left-hand
side,
allow
the
test
to
be
able
to
create
a
moxer,
so
maybe
maybe
just
enable
somehow
on
the
left-hand
side
to
say.
Oh
here's
here
like,
let's,
let's,
rather
than
because
I
think
we
want
to
do
a
little
bit
of
control
here
to
make,
because
we
have
a
lot
of
tests.
I
think
the
more
we
can
make
this
easier
to
adopt
the
better.
So
I
wouldn't
just
want
to
import
graphql
mock
factory
everywhere.
A
B
A
Yeah,
so
I
think,
having
a
module
that
that
adapts,
that
would
be
really
sweet,
but
it
does
seem
like
with
the
mocks.
There
are
that's
where
you
can
have
custom
domain
stuff,
and
I
wonder
if.
A
I
think
I
think
we
want
to
have
the
individual
tests
specify
a
they're
going
to
create
something
that
they
can
query
off
of
so
rather
than
rather
than
and
we'll
just
create
one
mock
server
for
them.
I
think
we
can
and
that's
also
a
side
effect
in
our
module,
like
let's
just
create
a
factory
function
for
them
to
say
here's
the
mox,
I'm
going
to
use
for
my
test
and
then
now
you
can
start
hitting
it
with
with
queries.
Do
you
want?
Do
you
want
to
try?
B
Yeah,
if
you
have
a
vision
for
this,
I'm
still
a
little
fuzzy
on
what
we
need
in
the
test
like
what
the
test
itself
is
going
to
look
like
that's.
If
you
have
a
vision,
maybe
you
can
drive
then
yeah.
I
have
a
quarter
of.
A
A
but
I'm
full
so.
A
Yeah
I'm
happy
to
drive
and
I
do
you
wanna.
Do
you
wanna
share?
A
D
A
B
A
A
Do
you
remember
where
it
was
this
one
right
there?
Oh,
I
think
I
found
it
right
here.
Yep
yep,
awesome,
okay,
I
don't
have
graphql
mock
factory
installed,
so
none
of
this
is
working,
but
you
did
ask
a
really
good
question
of
what
is
what
is
this
going
to
look
like.
A
To
accomplish
this
is
I
I
love
that
question,
and
so
this
is.
This
is
my
api
proposal
to
you.
This
is
how
decisions
get
made
made
them
a
room
with
red.
D
A
A
A
We
have
our
variables
and
I'm
going
to
pass
it
to
mock
gql,
I'm
going
to
pass
my
query
and
my
variables
and
we're
good
to
go.
That's.
B
Yeah
I
like
it,
I
think
I'm
trying
to
think
if.
B
A
A
But
that's
a
good,
that's
a
good
thought.
I
don't
know,
but
this
is.
This
is
what
I
was
gonna.
This
is
what's
gonna
start
trying
to
go
forward.
Doing
you
wanna,
you
wanna,
try
it
out.
B
B
A
But
let's
let's
try
it
out,
so
I'm
gonna
create
a
helper
called
create
mock.
Gql.
A
B
Yeah
it's
it's
kind
of
a
tricky
one.
No,
it
looks
good
to
me
and
so
the
return
value
of
this
thing
is
like
an
actual
piece
of
data
like
a
return
value
of
a
of
the
response
right.
A
So
this
creates
the
mock
server
and
we'll
return
our
query
function,
so
cool
yeah
we're
going
to
create
the
server
and
then
we're
gonna
create
our
query
function
and
then
we'll
return.
The
query
function,
that's
kind
of
how
I'm
playing
on
it
planning
on
doing
it
cool.
So,
let's
go
back
to
here.
I'm
probably
gonna,
we'll
rebase
this
at
some
point.
A
A
A
I
just
did
this
for
the
front
end
integration
specs,
because
it
would
not
fail
nicely
it
would
it
would
keep
trying
to
go
along.
You
think
you'd
get
just
completely
random
errors
and
yeah
it
was.
It
was
really
wild,
so
yeah,
it's
important
that
there's.
That
knows
what
to
do.
A
Okay,
so
going
back
to
here
where
you're
going
to
import,
then
mock
server
and
I'm
getting
all
sorts
of
weird
eslint
stuff,
because
I
guess
it
cached
the
oldest
length
rules.
Oh
right,.
B
So
I'm
gonna
close
this
you
can
you
can
rebase
this
branch
and
then
we
can
try
to
find
that
new
word
that
new
location
of
that
schema,
if
that
makes
things
easier,
let's.
A
Do
it
I'm
I'm
game
we'll
have
to
do
it
eventually.
That's
that's
true.
Are
you
cool
if
I
well
I'll,
save
this
and
it's
all
yeah,
so
I'll
save
this
I'm
going
to
create
a
commit
called
whip.
A
C
B
I'm
I'm
glad
you
have
the
same
standard
for
work
in
progress
commits
that
I
do.
A
A
Can
I
just
oh,
I
can
let
me
check
out
origin
master
yarn.
That
lock
is
that
gonna
overwrite
you,
oh
yeah,
cool,
oh
no,
there's
more
stuff!
Here!
Okay,
oh
no!
Someone
else
has
I've
been
developing.
B
B
I
would
say
if,
if
you
want
to
switch
to
a
like
a
snippet
related
one,
maybe
just
copy
paste,
that
existing
content
and
we'll
start
fresh
from
something
off
master
and
then
we'll
just
use
this
as
a
reference.
All.
A
Right,
yes,
we
might,
we
might
switch
to
a
different
one.
I'm
going
to
actually
just
comment
these
and
commit
that.
So
I
don't,
I
haven't,
lost
them
in
the
source
control.
They
still
wouldn't
be
lost
technically,
but
are
there
still
more
merge
conflicts?
Oh
it
doesn't
like
console
volume.
A
A
B
B
A
See
I
pretty
much
exclusively
do
oh
interesting.
I
hey
chad,
maybe
you're
also
writing
highly
decoupled
modules
that
don't
have
too
many
dependencies.
A
D
A
Okay,
but
we
found
a
pretty
cool
api,
I
think
for
this
for
this
helper,
so
let
me
close
others.
Let
me
do
a
cool
nathan.
Friend-Esque,
side-by-side
faith
is
like
the
only
person
that
does
this.
D
B
A
D
E
A
A
We
will
import
the
right
schema
and
we
will
create
this
graphql
mock
server
and
then
return
a
query
function.
That's
very
nice
to
use
that
hits
that
server.
B
A
A
A
A
B
A
B
A
I'm
going
to
this
is
that
line
of
code.
That's
doing
this,
and
this
is
actually
not
a
string.
So
I'm
going
to
get
rid
of
this
because
it's
not
a
string.
B
Another
question
too:
should
we
name
the
parameter
mox?
It's
really
overrides,
like
mock,
override,
compare
because
it's
it'll
automatically
mock
everything
by
default,
so
this
is
like
we
want
to
go
over
and
above
and
like
specify
specific
things.
C
A
Yeah,
so
I
don't,
I
don't
know,
no,
let's,
let's
stick
with
mugs.
That's
a
good
idea!
Okay,
if
you,
if
you
feel
strongly
about
changing
it,
I
don't
feel
strongly
either
way.
So,
no
okay!
So
then
our
query
function
is
gonna.
Take
a
a
quarry
and
I'm
gonna,
I'm
gonna
try
to
do
the
nice
thing,
and
this
can
either
be
that
query
object
or
a
string.
So
we'll
we'll
convert
it
variables
and
then.
A
And
so
we're
going
to
return,
query
and
the
mocked
server.
Oh,
I
don't
know
no.
I
am
going
to
do
that
because
I
need
to
convert
this
to
a
string.
So
I'm
going
to
do
this
const
quarry
string
equals.
A
B
A
Yeah
is
string
quarry,
otherwise
it's
corey,
lock,
source
body.
A
So
lame
restring
variables
args
and
that's
it
that
that
should
be
it
right.
What's.
B
A
So
I
wonder
if
we
can,
let's
just
try
to
do
it
for
this
one.
Let
me
first
run
this
back.
A
I
know
it
doesn't
live
here,
though,
so
I
know
that's
gonna
cause.
I
don't
know
why
it
thinks
it
lives
there
yeah.
Yes,
you
know
we
have
to
go
find
it.
A
B
A
A
B
D
A
Let
me
let
me
rename
my
file
now.
Actually,
though,
because
it's
create
gql
mock
factory,
that's
that's
what
we're
gonna
call
it
is
that
cool
all
right,
so
that
file
name
matches
the
import
name,
man,
something
is
chugging
along
running
file,
rename
participants!
A
A
A
A
Oh
gosh?
Okay,
here
we
go.
A
A
Right:
okay:
what's
what's
the
version
it's
at
right
now,
because
I
like
to
import
specific
versions.
A
It
seems
it
seems
pretty
cool,
though
it
does
seem
pretty
helpful,
and
I
haven't
seen
another
library
that
compares
to
it.
D
A
A
Previously,
we
have
a
whole
bunch
of
for
our
specs,
a
one-off
box,
one-off
mocks
for.
A
And
our
the
graphql
is
all
typed
like
we
have.
The
schema
like
you
should
be
able
to
just
generate
a
mock
based
on
what
you're
querying
and
okay
that's
what
this
does
yeah
now.
B
A
B
A
It
goes.
Let
me
double
check
because
now
now
we're
referencing
it
quite
a
few
places
now
yeah.
A
If
it
fails,
we
want
to
be
helpful.
We
want
to
say
something
like
the
command.
You
need
to
run
to
generate
it
yep,
and
I
actually
did
this
over.
A
I
did
this
already,
so
I'm
gonna
copy
that
yeah.
A
The
the
challenge
with
encapsulating
that
is
this
is
a
you'll
notice,
is
a
node.js
module
because
it's
run
at
the
at
like
just
integrate
like
the
config
startup,
and
so
I
I
think
we
can
import
common
js
stuff
in
es6
modules,
but
we
need
to
figure
out
a
good
place
to
where
this
stuff
is
going
to
live.
That
would
be
definitely
be
a
to
do
here,
but
not
right,
but
not
today.
A
Okay,
so
we
just
okay-
oh
that's
great,
but
I'm
going
to
disable
that
line.
I'm
going
to
remove
this
one
we're
going
to
get
lab
schema.
A
A
A
B
A
A
A
Okay,
I
think
you're
right
all
right.
So
all
I've
done
do
you
have.
Do
you
have
two
more
minutes
because
we're
pretty
close
yeah?
Oh.
B
A
A
I
kind
of
wonder
if
we
want
to
just
I'm
realizing
how
this
is
set
up
now
and
it's,
and
maybe
I
can't
just
replace
this,
maybe
I
can
maybe
I
should
do
this.
What
do
you
think
of
doing
this
doing
it
right?
There
yeah,
you
think,
that's
cool.
B
A
Point
yep
yep.
I
I
hear
you.
I
think
that
there's
something
I
think
there's
something
nice,
though,
if
about
doing
it,
where
we
get
the
actual
variables,
I
don't
know
why.
I
think
that's
nice,
but
I
think
it's
nice
yeah.
This
should
still
pass.
Let's
see
if
that
works,
sweet
cool,
let's
see
if
we
can
do
the
next
one,
and
this
might
be
an
easy
way
to
start
migrating
this.
This
might
be
the
easiest
way
for
us
to
start
migrating
stuff
over
yeah
you
so
mutation
mock
would
be
interesting.
B
A
It's
not
money,
they
didn't.
Let
me
copy
this,
I
don't
even
know
if
there's
any
variables,
let
me
open
up.
Let
me
move
your
face.
C
A
A
B
A
I'm
curious,
so
I
do
also
want
to
know
what
does
this
actually
just
look
like
equivalent
console
log
this
out.
A
Look
how
sweet
this
is,
do
you
see
how
it
even
does
it
blew
up,
because
you
see
how
it's
the
variables
you.
A
It
makes
me
it
kind
of
confirms
to
me
that
I
do
think
we
did.
The
right
api
here
of
this
is
something
we
need
to
call
at
the
mock
resolver
level
with
the
variables
that
were
passed
to
it.
So
I'm
gonna,
I'm
gonna,
try
that
out
so
here
we're
gonna
do
a
mock
implement.
A
Oh
my
gosh
implementation
update
namespace,
oh
gosh,
I'm
not
doing
this
right
variables
and
we're
going
to
call
our
mock
gql.
A
Let
me
let
me
delete
this.
Let
me
delete
this.
Our
mutation
mock,
I'm
gonna,
try
to
replace
all
of
our
mutation
modes.
I
know
I
know
we're
at
time.
You
get.
You
got
a
little,
you
yeah!
No,
I
have
nothing
after
this.
So,
okay,
all
right.
Here's,
here's
one
where
we
have
we,
so
I
this
way
of
like
passing
spies
into
like
I
feel
like
having
complicated
factory
functions,
always
makes
things
like
this
complicated.
I
like
having
surprise
I
personally
my
personal
preference.
I
like
having
spies
like.
A
I
know,
I'm
always
going
to
need
to
resolve
our
mutation
result
like
my
component
doesn't
work
without
that.
Like
I
like
having
all
that
here
and
then
let
me
just
in
the
before
each
here's
my
default
and
then
I
can
just
override
some
people.
Don't
like
that
and
that's
okay,
it's
okay,
that
we're
all
different.
A
Mock
gql
thing
with
our
mutation,
is
it
still
called
the
quarry?
Do
you
still
call
it
a
quarian
graphql
and
is
it
mutation
query?
I
don't
know,
I
don't
know
if
mutation
is
a
subset.
B
A
A
B
So
I'm
trying
to
think
is
it's
really
cool
that
it
does
that,
but
is
that,
is
it
actually
testing
anything
in
our
code
or
is
it
just
testing
that
our
test
is
passing
in
the
the
right
variables
because,
like
a
question,
yeah
is
there
any?
Is
there
any
case
where
we'd
catch
incorrect
variables
being
passed
in
actual
production
code?
Let's.
A
Oh
we
are.
We
were
already
testing
that,
but
I
would
think
that
I
would
now
blow
up
when
my
input
wasn't
correct.
A
Some
reason
something's
not
being
called
here,
though
this
is
that's
interesting.
I
think
I
think
that's
the
kind
of
thing
that
it'd
be
nice
to
test
against
our
actual
schema.
Is
you
know
here,
we've
even
hard-coded
hey.
I
expect
this
input,
but
we
don't
even
know
if
that's
what
the
back
end
is
expecting
really
sweet
with
get
with
graphql
is
back
end
and
front
end
both
have
a
contract.
We
both
need
to
agree
on,
and
so
now
we
can.
Yes,
I
want
to
still
do
these
assertions.
A
That's
really
helpful,
but
now
I
have
another
layer
of
these
are
also
you
know
none
of
this.
Hopefully
none
of
this
would
work.
I
I
would
get
some
errors
when
trying
to
use
my
mock
gql,
because
I'm
passing
bad
types.
That
would
be
really
nice
information
and
I
think
we
would
get
that
information.
I'm
surprised,
it's
not
super
showing
up
right
now,
but
I
think
that
might
have
to
do
with
for
some
reason
this.
Not
these
calls
not
working.
B
So
I'm
kind
of
comparing
I'm
thinking
about
it.
Like
that,
other
library,
we
use
to
mock
out
rest
apis,
where
what's
that
one
called
it's
like,
also
apollo
something,
but
you
you
say
you
know,
here's
the
rest
api.
I
expect
and
here's
the
variables
and
if
I
receive
a
request
to
this
with
these
variables,
then
return
this
response.
You
mean
like
just
kind
of
what
we're
doing
here.
A
The
axios
mock
adapter
yeah,
that's
that's
the
one
yeah
that's
what
these
resolvers
are.
Actually
that's.
What
the
apollo
provider
this
mock,
apollo
provider.
I
have,
I
almost
have
a
pretty
close
one
to
one
mapping
to
this
mac
apollo
adapter,
this
mac
apollo
and
our
previous
axios
mock
adapter.
It's
very
very
similar.
A
This
is
the
query,
and
this
is
my
handling
function
of
that
and
I
have
found
it
to
be
really
helpful
when
I
treat
it
like
that
to
have
like
shared
variables
for
like
here's,
my
collaborating
endpoints,
which
I
can
configure
at
different
levels
like
like
here's,
my
here's.
My
query,
like
I
would
say,
here's
my
query,
resolver
and
then
here's
my
mutation
resolver.
I
like
having
all
those
up
here,
but
this
is
all
fine
too.
B
Yeah,
so
so
part
of
the
value
that
that
axios
mock
adapter
provides
is
that
it
it
will
fail
if
it
if
you,
if
your
production
code
doesn't
give.
You
doesn't
make
the
request
with
the
correct
variables,
which
is
not
true
for
our
graphql
thing
right
like
we're,
not
really
testing
that.
A
Yeah
and
so
that's
why,
usually
you
know
if,
if
someone
is
writing
a
good
test
using
all
this
they'll
have
their
resolvers
be
spies,
which
they
can
then
say
hey?
Did
I
hit
the
resolver
with
the
right
stuff?
Yeah,
that's
what
that's
doing,
but
it's
still
all
just
front
end
focus
and
isn't
we
still
don't
know?
A
We
know
that
this
is
the
consistent
stuff.
We
don't
know
is
this
even
the
right
stuff
and
that's
information
we
get
from
the
graphql
schema.
So
this
is
this
is
sweet.
I
think
I
know
why
this
isn't
working
though
I
think,
because
our
query
like
can
we
can
we
hop
to
our
mutation
query.
A
A
It's
not
saving
successfully
yeah
yeah,
and
so
we
get
to
use
our
mock
override
thing,
which
sounds
cool
so
or
maybe
we
can
even
do
that
here.
So
maybe
in
package
settings
or
like
maybe
in
here.
A
Maybe
maybe
it
does
namespace,
maybe
it
does.
Let
me
see
if
I
can,
I'm
gonna
open
our
gitlab
schema.
A
B
A
A
Yeah,
I
don't
know
what
its
problem
is.
I'm
gonna
work
out
a
little
more,
but
if
you
gotta
hop
off
feel
free
to
unless
I
really
appreciate
your
company,
but.
A
B
B
C
A
A
Sometimes
I
open
up
things
in
them
down
here
and
I
completely
forget
I'm
envious
and
I'm
just
at
a
very
small
vent
screen.
Let
me
console.log
an
error,
because
I
I
bet
we're
getting
an
error
and
just
not
seeing
it.
B
A
Well,
for
as
a
very
iterative
step
create
gql,
what
do
you
think
of
just.
B
B
Right
mock
list,
that's
really
unfortunate
that
it
does
that
it's.
I
wonder
why
it
has
to
do
that.
A
A
A
B
A
A
B
A
A
All
right
yeah,
this
has
given
us
lots
of
good
problems
to
solve.
I'm
gonna
wrap
this
right
now.
B
A
I
kind
of
wonder
if
maybe
don't
don't
laugh
at
me.
I
kind
of
wonder
if
well
maybe,
instead
of
returning.
B
B
Let's
see
where
we're
in
yeah
there
like,
we
have
those
variables,
but
what
are
they
actually
like?
How
would
we
ever
use
them
or
what
would
they?
A
So
that's
a
root,
that's
a
pretty
sweet
win,
I
think
of,
but
I
also
think
these
variables
something
tells
me
they
may
also
show
up
here
in
these
these
functions
and
they
can
kind
of
do
dynamic
things
based
on.
I
think
so,
and
that's
impossible
too.
So
I
yeah,
but
that's
I'm
just
I'm
assuming
that
that
should
be
possible,
but
I
don't
know,
but
I
do
kind
of
wonder
to
get
this
ace.
A
I
was
wondering
what,
if
we
have
mock
gql,
what
if
we
did
a
generate
and
a
generate
async
or
something
like
that
or
like
what
so
that
we
can
yeah.
D
A
Easier
one
that
wraps
it
in
moments:
yeah
yeah
yeah.
Well,
would
you
do
you
like
that.
B
Yeah
would
we
also
need
to
generate
a
rejected
promise
version
of
it?
We
probably.
A
A
Function
itself
could
be
all
right.
That's
fancy
all
right.
Let's,
let's
do
that.
I
still
can't
think
of
a
good
name
for
this.
Now
I
have
to
name
it.
I'm
gonna
call
this
don't
laugh
at
me.
I'm
gonna
call
this
cory.
A
That
rocks
this
is
the
same
thing
as
doing
promise
resolve
of
cory.
Query
yeah
yeah
nice
just
like
that,
I
think
so
yeah.
Maybe
we
should
actually
do
resolve
and
reject,
because
that's
the
promise
right.
B
A
A
A
Oh
yes,
and
and
other
places-
I
was
doing
this
where
another
namespace
package
settings.
A
A
A
So
I'm
gonna
fit
these.
Let
me
let
me
let
me
focus
on
those
I
know
we're
at
time,
but
but
it's
been
so
much
fun.
I
know
we're
so
close.
A
So
I
want
to
actually
just
console.log
what
do
I
get
from
the
mutation
resolver
or
even
let
me
just
console.log
in
our
and
our
app
here.
Oh,
I
am
doing
that
we're
not
getting
any
errors,
so
my
my
my
mock
thing
was
not
doing
at
all
what
I
thought
it
would
be
doing.
C
B
What
did
you
do?
The
dot
rejected
there
or
you
didn't
got
resolved.
A
Oh,
I
was
doing
resolve
here,
so
that's
what
we
want
to
do.
I
think
we
do
want
to
resolve
this,
but
it
has
errors.
A
A
I
think
that's
this,
oh
this,
because
we
both
of
these
would
cause
an
error
if
the
promise
was
rejected
or
if
it's
resolved
with
errors.
I
think
here's
pass
a
mock
override
object.
Oh
I
think,
with
mock
overrides
you
don't
have
to
do
this
whole
base
thing.
I
think
I
can
just
do
something
like
errors.
A
No
clearly,
I
can't
just
do
something
like
that.
I
didn't
like
that
at
all.
A
No
all
right
pass
a
mock
override
here
we
specify
viewer.firstname.
The
other
response
field
will
be
generated.
I
need
to
whatever
is
my
root
name
here.
I
think
so.
I
need
to
do
like
this.
I
think.
A
That
is
cool,
we're
so
close,
all
right.
Well,
it's
kind
of
time
yeah,
so
dude
thanks
so
much
nathan.
This
is
awesome.
I'll
I'll
put
you.
A
I'll
create
a
new
merch
request
too
off
of
this
and
yeah.
I'm
feeling
this
there's
something
here,
I
think
there's
some
quirkiness
we've
obviously
ran
into,
but
I
think
this
is
going
to
allow
us
to
remove
a
lot
of
a
lot
of
this
stuff
and
give
you
more
a
little
bit
more
test
safety.
So
that's
exciting
yeah.