►
Description
In this video, we review the design versions dropdown feature. https://gitlab.com/gitlab-org/gitlab-ee/issues/9491 The UI part is already implemented, so we're not touching any templates. Instead, we cover the flow of fetching new data from GraphQL endpoint and incorporate them into design management application.
Chapters:
1. Show GraphiQL explorer
2. Integrate the query
3. Using this query in the Vue component
4. Refactor Design dropdown to fetch data from Apollo cache
For more information about FE Skillsharing, see https://gitlab.com/gitlab-org/frontend/skillsharing
A
Now,
let's
try
to
bet
versions.
As
you
can
see,
they
are
located
within
project
query
and
you
should
go
to
the
issue.
We
have
to
the
design
collection
and
you
can
see
we
have
a
list
of
designs
here
and
versions
as
well.
I've
already
created
a
very
simple
query
for
versions:
I
will
just
uncomment
it
here
and
let's
give
it
a
try,
as
you
can
see
it
fetched
an
array
of
versions.
So
we
need
to
add
this
part
of
the
project
query
to
our
front-end.
A
A
A
The
power
Apollo
object,
so
we'll
feature
not
only
designs
but
versions
as
well
in
our
update
hood
we're
just
getting
rid
of
all
the
edges
part
and
we're
saving
them
to
the
out
versions
array,
let's
filter
the
Browns
of
back
and
let's
simply
check
the.
What
do
we
have
on
our
index?
As
you
can
see,
there
is
an
array
of
all
versions
wedged
from
the
back
end,
and
we
don't
have
edges
here
because
we
did
the
transformation.
A
Now,
let's
see,
how
do
we
pass
them
to
our
design
drop
down
component?
Here
we
have
an
upload
form
where,
with
as
other
versions
for
the
top,
let's
go
deeper
and
here
in
the
upload
form.
We
have
this
on
versions
drop
down
and
again
we
were
passing
all
versions
to
the
fourth
and
here
just
rendering
them
as
it
dropped
down.
A
As
you
can
see
here,
we
are
batching
two
queries
its
permission
and
project.
Let's
try
to
move
our
all
versions,
query
directly
to
the
drop
down
bone.
To
do
so,
I
will
uncomment
these
two
queries.
We
just
important,
where
is
from
gradual
files
here,
I
will
also
command
this
mixing.
In
fact,
this
Nixon
is
just
passing
a
crop
hang
on.
Let's
add
Apollo
properties
here
where
we
will
add
two
queries.
A
A
Application
Clara,
this
query
is
fetching
project
pass
and
issue
ID
from
our
Apollo
cache,
where
the
stored
from
the
euro.
So
let's
just
copy
paste
this
updatable
and
ended
answer:
let's
go
to
the
browser
and
check
what's
going
on
here
now:
errors,
as
you
can
see,
our
problem
is
still
working
and
let's
go
to
the
network
tab
refresh
it.