background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "GraphQL #8 Создаём первую мутацию (Create First Mutation)"

input logo icon
Video tags
|

Video tags

web
develop
front-end
frontend
веб
разработка
программирование
обучение
education
tutorial
лекция
образование
graphql tutorial
learn graphql
apollo client
mlab
react
reactjs
react js
graphql tutorial for beginners
graphql apollo
graphql react
graphql уроки
graphql введение
graphql для начинающих
graphql запросы
graphql как работает
graphql обзор
graphql руководство
graphql туториал
graphql overview
apollo graphql
react graphql apollo tutorial
react graphql
yauhenk
webdev
graphql
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:00
[music]
00:00:13
hello everyone, I’m Evgeny Kovalchuk and you’re on the
00:00:15
channel in pdf, we continue to discuss the
00:00:18
topic with you. The graph nods and as mentioned
00:00:21
earlier, optically all queries in
00:00:24
gel paint can be divided into two types 1 this is
00:00:27
Mary,
00:00:28
it is used to obtain data from the database and the
00:00:31
second type these are mutations, they are needed in
00:00:34
order to change this data, that is,
00:00:37
add new ones, change and delete
00:00:39
existing
00:00:41
warri, we have already discussed with you
00:00:43
in today's video lesson, we will begin to
00:00:46
look at mutations of reality,
00:00:48
mutations are nothing complicated, these are all the
00:00:52
same requests where we indicate the ios type and
00:00:55
so on the only way they
00:00:57
differ from faith is that mutation
00:01:00
is a separate type of request, this is the first
00:01:03
difference and the second is the implementation of the rez method,
00:01:06
let's create a notation for adding a
00:01:09
director, our database
00:01:12
looks like this, for
00:01:42
now we'll stop, look, everything is very
00:01:44
similar, to begin with, I'm creating a new mutation type
00:01:48
using graph que el ojo toy also
00:01:51
we define the type of request as but you eat
00:01:54
further fields we will add all
00:01:57
our mutations initially I added so far
00:02:00
one
00:02:01
IT director who will add the
00:02:04
director internal and also
00:02:06
defines the type director type since
00:02:09
we will continue to work with the director type
00:02:13
field arcs, we define the arguments coming from
00:02:16
the cast; each director, as you
00:02:19
remember, we have a name and age,
00:02:22
both of these values ​​we will take from the
00:02:25
request arguments and, as you can see,
00:02:28
using the quelle string graph and the ln graph.
00:02:31
we define their types, that is, a string and
00:02:34
a number,
00:02:35
then we add a method called by
00:02:38
which we will describe all the functionality
00:02:50
ready, look using the manga from the diagram,
00:02:53
we define a new entity, this is an object
00:02:57
with a name and age, both parameters as
00:03:00
you can see, we take from the arguments and
00:03:02
then the created instance using
00:03:05
method safe we ​​save the database safe this is
00:03:09
again the method of the Mangus library
00:03:11
poisons we have created our first mutation
00:03:14
now we just have to define it
00:03:16
inside the graph of the electronic diagram
00:03:21
now we switch to the
00:03:23
el graphics interface we
00:03:25
refresh the page and as you can
00:03:27
see the action
00:03:29
explorer document we have a mutation if we Let's
00:03:32
open it, then you will see our mutation
00:03:36
it-director,
00:03:37
well, let's use this
00:03:39
mutation, add a new director, our
00:03:41
database will look like this,
00:03:56
believe in rails, add the value that
00:03:59
we want to add to our database
00:04:05
and execute this request,
00:04:07
open map,
00:04:10
go to the directors tab
00:04:14
and as you see the collection of directors,
00:04:16
our test director has appeared if we
00:04:19
go back to the graphics interface and
00:04:21
then as you see in the right column
00:04:25
the result of execution this director
00:04:28
returns to us this happens because
00:04:32
we do not return anything from the arbitrariness method and this is not entirely
00:04:35
good since we cannot check
00:04:38
if everything went well, so let's
00:04:40
return the result of the
00:04:42
save method from it,
00:04:46
for this, give the vector to the mutation, I
00:04:49
just added the keyword rider,
00:04:51
now if we switch to the interface
00:04:54
and run our request again, we
00:04:57
will return the values ​​of name and edge
00:05:00
and the collection itself
00:05:03
after that how do we update it, we
00:05:06
will add another test director,
00:05:09
we can safely delete this test data
00:05:10
since we have verified that our
00:05:13
mutation works perfectly.
00:05:16
Again, I want to note that at this
00:05:19
stage we can handle various
00:05:21
exceptions, that is, in case of incorrect
00:05:23
work with the database, we can set
00:05:26
certain errors and then
00:05:29
process them in yuan, for example,
00:05:31
show notify porridge about the error,
00:05:34
well, we’ve dealt with the mutation for the director,
00:05:36
now let’s create a
00:05:39
mutation for the film, it looks like this:
00:06:03
ready, everything was created according to the template of the
00:06:06
previous example,
00:06:07
the only thing that has been done at the
00:06:09
moment is a crutch for this diver 3d,
00:06:12
we again need to bring everything in with our hands,
00:06:14
but this is a temporary inconvenience,
00:06:16
since later for our
00:06:19
application we will write it
00:06:20
and this minus and it will pop up more, but
00:06:23
for now let's try to add a
00:06:25
new movie to our collection, for this
00:06:28
we switch to the graphics interface
00:06:31
and use our new written
00:06:33
mutation
00:06:51
as you could see the mutation
00:06:54
worked perfectly believe it is easy we
00:06:56
switch to the and young
00:06:58
collection of films and scroll to the very
00:07:00
bottom as you see a film with the name test
00:07:04
genre with genre ido3d
00:07:08
we have a collection congratulations
00:07:10
now we have a mutation for
00:07:13
adding information to our database up to 1
00:07:17
minor comment that I noticed is
00:07:19
not related to the course, but if we open
00:07:22
our working project and look in the console,
00:07:25
we will see information that the option
00:07:28
we are using is already
00:07:31
in fact diptyque, that is, it is
00:07:33
outdated, the whole point is the fact that when I
00:07:36
wrote the script for this course, this
00:07:38
configuration is relevant, but when I
00:07:41
remove this course, as you can see, it is already
00:07:44
outdated, so all we need is to
00:07:47
just change the parameter that is
00:07:49
offered in the console, we update it, and
00:07:52
as you can see, now we have no errors
00:07:54
well, as usual, you can find all the code
00:07:58
in the movie about the repository and don’t
00:08:00
forget to like and subscribe
00:08:02
to the channel,
00:08:03
see you in the next lecture bye
00:08:06
[music]

Description:

Всех приветствую в курсе «GraphQL». В данном видео-курсе мы с вами разберём библиотек GraphQL. GraphQL – фактически это язык запросов или синтаксис, который описывает как запрашивать данные, созданный в компании Facebook в 2012 году. Его разработали в качестве альтернативы REST-архитектуры. Он позволяет клиенту запросить лишь желаемые данные. За все отвечает именно клиент. Т.е. GraphQL можно использовать не только на серверной, но и на клиентской стороне. Он имеет три основные характеристики: - Он позволяет клиенту точно указать, какие данные ему нужны. - Облегчает агрегацию данных из нескольких источников. - Использует систему типов для описания данных. ✒ Репозиторий курса: ✔ GitHub: https://github.com/YauhenKavalchuk/graphql ✒ Используемые ресурсы и инструменты: ✔ Atom (Редактор кода):https://github.blog/2022-06-08-sunsetting-atom/ ✔ Create React App (Рабочее окружение): https://github.com/facebook/create-react-app ✔ mLab (База данных): https://mlab.com ✔ Material-UI (Интерфейс приложения): https://mui.com/material-ui/ ✔ Apollo Client: https://www.apollographql.com/docs/react/ ✒ Полезные ссылки: ✔ Graphql (Документация):https://graphql.org/learn/ ✒ Полезные курсы на канале: ✔ ES6: https://www.youtube.com/playlist?list=PLNkWIWHIRwMGLJXugVvdK7i8UagGQNaXD ✔ React & Redux: https://www.youtube.com/playlist?list=PLNkWIWHIRwME_Gv2vlWAR6TfeSXylYfw4 ✒ Полный список готовых и планируемых курсов: ✔ Trello: https://trello.com/b/R6rD7qq8 ✒ Автор курса: ✔ YouTube: https://www.youtube.com/YauhenKavalchuk ✔ Instagram: https://www.facebook.com/unsupportedbrowser ✔ Twitter: https://twitter.com/YauhenKavalchuk ✔ VK: https://vk.com/YauhenKavalchuk ✔ LinkedIn: https://www.linkedin.com/in/YauhenKavalchuk ✔ GitHub: https://github.com/YauhenKavalchuk ✔ VK (Группа): http://vk.com/webdevcom ✒ Поддержать развитие канала: https://github.com/YauhenKavalchuk/youtube/blob/main/sponsoring.md

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "GraphQL #8 Создаём первую мутацию (Create First Mutation)" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "GraphQL #8 Создаём первую мутацию (Create First Mutation)" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "GraphQL #8 Создаём первую мутацию (Create First Mutation)" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "GraphQL #8 Создаём первую мутацию (Create First Mutation)" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "GraphQL #8 Создаём первую мутацию (Create First Mutation)"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "GraphQL #8 Создаём первую мутацию (Create First Mutation)"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.