What is GraphQL? Learn how it compares to REST and why developers love this query language for reading and mutating data in APIs https://fireship.io/tags/graphql

GraphQL API Docs https://graphql.org/
SpaceX GraphQL API https://api.spacex.land/graphql/

#dev#graphql #100SecondsOfCode

Install the quiz app 🤓

iOS https://itunes.apple.com/us/app/fireship/id1462592372?mt=8
Android https://play.google.com/store/apps/details?id=io.fireship.quizapp

Upgrade to Fireship PRO at https://fireship.io/pro
Use code lORhwXd2 for 25% off your first payment. 

My VS Code Theme

- Atom One Dark 
- vscode-icons
- Fira Code Font
2024-02-04T05:57:00.395Z
nova-2
2-general-nova
2024-01-09.29447
30089e05-99d1-4376-b32e-c263170674af
6aa5ee95-5791-4e46-bb09-68aa4d6804ca
d07f5f1a9830ad94b7db1ec4b47b7ae557b6f7f590933caab1a9cb78032c1cb7
67875a7f-c9c4-48a0-aa55-5bdb8a91c34a
deprecated
GraphQL, a query language for reading and mutating data in APIs.
As a back end developer, GraphQL provides a type system where you can describe a schema for your data.
In turn, this gives front end consumers of the API the power to explore and request the exact data they need.
Traditionally, web developers have consumed APIs using REST, where data entities live on a bunch of URLs on a server.
When a request is received, the API responds with the full data payload of that entity.
That sounds simple enough, but there are 2 potential drawbacks we may need multiple entities at one time, in which case, each request is under fetching the actual data we want.
In other cases, we may only want a small subset of a data entity, in which case, we need to over fetch from the API.
And that, of course, is bad for the environment.
How dare you.
Instead of multiple URLs, a GraphQL API has a single entry point.
Data is queried or fetched by describing it with a syntax that mirrors its return shape in JSON.
The front end developer describes the data they want while the back end developer writes code to resolve the request, and and it all happens in a syntax that can work with any programming language, we can start defining a schema with our own custom objects using the type keyword.
A type can have multiple fields like a unique ID and we'll make that required with a bang.
Let's also give it integer and string values, then create a relationship with another type.
A creator can have many videos which we can represent by wrapping the type in brackets.
On the flip side, a video belongs to a reader.
Now every GraphQL API has a query type, which is the main entry point for a consumer of the API.
We can query a list of videos or an individual user based on their ID.
That's how a consumer reads data, but they may also want to mutate data.
In which case, we implement a mutation type that defines how data can be modified on the API.
From there, we can define code to resolve this data in any programming language.
Once deployed, any developer consuming this API I will be able to explore it with a complete understanding of all possible queries and data entities, which means the tooling can auto complete your query as you type it out in your editor.
This has been GraphQL in 100 seconds.
If you wanna see more short videos like this, make sure to like and subscribe, and turn on notifications because there is a lot more on the way.
Thanks for watching, and I will see you in the next one.

Speaker 0: GraphQL, a query language for reading and mutating data in APIs. As a back end developer, GraphQL provides a type system where you can describe a schema for your data. In turn, this gives front end consumers of the API the power to explore and request the exact data they need. Traditionally, web developers have consumed APIs using REST, where data entities live on a bunch of URLs on a server. When a request is received, the API responds with the full data payload of that entity.

That sounds simple enough, but there are 2 potential drawbacks we may need multiple entities at one time, in which case, each request is under fetching the actual data we want. In other cases, we may only want a small subset of a data entity, in which case, we need to over fetch from the API. And that, of course, is bad for the environment. How dare you. Instead of multiple URLs, a GraphQL API has a single entry point.

Data is queried or fetched by describing it with a syntax that mirrors its return shape in JSON. The front end developer describes the data they want while the back end developer writes code to resolve the request, and and it all happens in a syntax that can work with any programming language, we can start defining a schema with our own custom objects using the type keyword. A type can have multiple fields like a unique ID and we'll make that required with a bang. Let's also give it integer and string values, then create a relationship with another type. A creator can have many videos which we can represent by wrapping the type in brackets.

On the flip side, a video belongs to a reader. Now every GraphQL API has a query type, which is the main entry point for a consumer of the API. We can query a list of videos or an individual user based on their ID. That's how a consumer reads data, but they may also want to mutate data. In which case, we implement a mutation type that defines how data can be modified on the API.

From there, we can define code to resolve this data in any programming language. Once deployed, any developer consuming this API I will be able to explore it with a complete understanding of all possible queries and data entities, which means the tooling can auto complete your query as you type it out in your editor. This has been GraphQL in 100 seconds. If you wanna see more short videos like this, make sure to like and subscribe, and turn on notifications because there is a lot more on the way. Thanks for watching, and I will see you in the next one.
GraphQL, a query language for reading and mutating data in APIs. As a back end developer, GraphQL provides a type system where you can describe a schema for your data. In turn, this gives front end consumers of the API the power to explore and request the exact data they need. Traditionally, web developers have consumed APIs using REST, where data entities live on a bunch of URLs on a server. When a request is received, the API responds with the full data payload of that entity.
databases
data management
data
internet
programming
That sounds simple enough, but there are 2 potential drawbacks we may need multiple entities at one time, in which case, each request is under fetching the actual data we want.
In other cases, we may only want a small subset of a data entity, in which case, we need to over fetch from the API. And that, of course, is bad for the environment. How dare you. Instead of multiple URLs, a GraphQL API has a single entry point. Data is queried or fetched by describing it with a syntax that mirrors its return shape in JSON. The front end developer describes the data they want while the back end developer writes code to resolve the request, and and it all happens in a syntax that can work with any programming language, we can start defining a schema with our own custom objects using the type keyword. A type can have multiple fields like a unique ID and we'll make that required with a bang. Let's also give it integer and string values, then create a relationship with another type. A creator can have many videos which we can represent by wrapping the type in brackets. On the flip side, a video belongs to a reader. Now every GraphQL API has a query type, which is the main entry point for a consumer of the API. We can query a list of videos or an individual user based on their ID. That's how a consumer reads data, but they may also want to mutate data. In which case, we implement a mutation type that defines how data can be modified on the API. From there, we can define code to resolve this data in any programming language. Once deployed, any developer consuming this API I will be able to explore it with a complete understanding of all possible queries and data entities, which means the tooling can auto complete your query as you type it out in your editor. This has been GraphQL in 100 seconds. If you wanna see more short videos like this, make sure to like and subscribe, and turn on notifications because there is a lot more on the way. Thanks for watching, and I will see you in the next one.
programming
visualization
streaming
software development
databases
software
youtube
data
data management
video gaming
multimedia
GraphQL, a query language for reading and mutating data in APIs. As a back end developer, GraphQL provides a type system where you can describe a schema for your data. In turn, this gives front end consumers of the API the power to explore and request the exact data they need. Traditionally, web developers have consumed APIs using REST, where data entities live on a bunch of URLs on a server. When a request is received, the API responds with the full data payload of that entity. That sounds simple enough, but there are 2 potential drawbacks we may need multiple entities at one time, in which case, each request is under fetching the actual data we want. In other cases, we may only want a small subset of a data entity, in which case, we need to over fetch from the API. And that, of course, is bad for the environment. How dare you. Instead of multiple URLs, a GraphQL API has a single entry point. Data is queried or fetched by describing it with a syntax that mirrors its return shape in JSON. The front end developer describes the data they want while the back end developer writes code to resolve the request, and and it all happens in a syntax that can work with any programming language, we can start defining a schema with our own custom objects using the type keyword. A type can have multiple fields like a unique ID and we'll make that required with a bang. Let's also give it integer and string values, then create a relationship with another type. A creator can have many videos which we can represent by wrapping the type in brackets. On the flip side, a video belongs to a reader. Now every GraphQL API has a query type, which is the main entry point for a consumer of the API. We can query a list of videos or an individual user based on their ID. That's how a consumer reads data, but they may also want to mutate data. In which case, we implement a mutation type that defines how data can be modified on the API. From there, we can define code to resolve this data in any programming language. Once deployed, any developer consuming this API I will be able to explore it with a complete understanding of all possible queries and data entities, which means the tooling can auto complete your query as you type it out in your editor. This has been GraphQL in 100 seconds. If you wanna see more short videos like this, make sure to like and subscribe, and turn on notifications because there is a lot more on the way. Thanks for watching, and I will see you in the next one.
GraphQL,
graphql
a
a
query
query
language
language
for
for
reading
reading
and
and
mutating
mutating
data
data
in
in
APIs.
apis
As
as
a
a
back
back
end
end
developer,
developer
GraphQL
graphql
provides
provides
a
a
type
type
system
system
where
where
you
you
can
can
describe
describe
a
a
schema
schema
for
for
your
your
data.
data
In
in
turn,
turn
this
this
gives
gives
front
front
end
end
consumers
consumers
of
of
the
the
API
api
the
the
power
power
to
to
explore
explore
and
and
request
request
the
the
exact
exact
data
data
they
they
need.
need
Traditionally,
traditionally
web
web
developers
developers
have
have
consumed
consumed
APIs
apis
using
using
REST,
rest
where
where
data
data
entities
entities
live
live
on
on
a
a
bunch
bunch
of
of
URLs
urls
on
on
a
a
server.
server
When
when
a
a
request
request
is
is
received,
received
the
the
API
api
responds
responds
with
with
the
the
full
full
data
data
payload
payload
of
of
that
that
entity.
entity
That
that
sounds
sounds
simple
simple
enough,
enough
but
but
there
there
are
are
2
2
potential
potential
drawbacks
drawbacks
we
we
may
may
need
need
multiple
multiple
entities
entities
at
at
one
one
time,
time
in
in
which
which
case,
case
each
each
request
request
is
is
under
under
fetching
fetching
the
the
actual
actual
data
data
we
we
want.
want
In
in
other
other
cases,
cases
we
we
may
may
only
only
want
want
a
a
small
small
subset
subset
of
of
a
a
data
data
entity,
entity
in
in
which
which
case,
case
we
we
need
need
to
to
over
over
fetch
fetch
from
from
the
the
API.
api
And
and
that,
that
of
of
course,
course
is
is
bad
bad
for
for
the
the
environment.
environment
How
how
dare
dare
you.
you
Instead
instead
of
of
multiple
multiple
URLs,
urls
a
a
GraphQL
graphql
API
api
has
has
a
a
single
single
entry
entry
point.
point
Data
data
is
is
queried
queried
or
or
fetched
fetched
by
by
describing
describing
it
it
with
with
a
a
syntax
syntax
that
that
mirrors
mirrors
its
its
return
return
shape
shape
in
in
JSON.
json
The
the
front
front
end
end
developer
developer
describes
describes
the
the
data
data
they
they
want
want
while
while
the
the
back
back
end
end
developer
developer
writes
writes
code
code
to
to
resolve
resolve
the
the
request,
request
and
and
and
and
it
it
all
all
happens
happens
in
in
a
a
syntax
syntax
that
that
can
can
work
work
with
with
any
any
programming
programming
language,
language
we
we
can
can
start
start
defining
defining
a
a
schema
schema
with
with
our
our
own
own
custom
custom
objects
objects
using
using
the
the
type
type
keyword.
keyword
A
a
type
type
can
can
have
have
multiple
multiple
fields
fields
like
like
a
a
unique
unique
ID
id
and
and
we'll
we'll
make
make
that
that
required
required
with
with
a
a
bang.
bang
Let's
let's
also
also
give
give
it
it
integer
integer
and
and
string
string
values,
values
then
then
create
create
a
a
relationship
relationship
with
with
another
another
type.
type
A
a
creator
creator
can
can
have
have
many
many
videos
videos
which
which
we
we
can
can
represent
represent
by
by
wrapping
wrapping
the
the
type
type
in
in
brackets.
brackets
On
on
the
the
flip
flip
side,
side
a
a
video
video
belongs
belongs
to
to
a
a
reader.
reader
Now
now
every
every
GraphQL
graphql
API
api
has
has
a
a
query
query
type,
type
which
which
is
is
the
the
main
main
entry
entry
point
point
for
for
a
a
consumer
consumer
of
of
the
the
API.
api
We
we
can
can
query
query
a
a
list
list
of
of
videos
videos
or
or
an
an
individual
individual
user
user
based
based
on
on
their
their
ID.
id
That's
that's
how
how
a
a
consumer
consumer
reads
reads
data,
data
but
but
they
they
may
may
also
also
want
want
to
to
mutate
mutate
data.
data
In
in
which
which
case,
case
we
we
implement
implement
a
a
mutation
mutation
type
type
that
that
defines
defines
how
how
data
data
can
can
be
be
modified
modified
on
on
the
the
API.
api
From
from
there,
there
we
we
can
can
define
define
code
code
to
to
resolve
resolve
this
this
data
data
in
in
any
any
programming
programming
language.
language
Once
once
deployed,
deployed
any
any
developer
developer
consuming
consuming
this
this
API
api
I
i
will
will
be
be
able
able
to
to
explore
explore
it
it
with
with
a
a
complete
complete
understanding
understanding
of
of
all
all
possible
possible
queries
queries
and
and
data
data
entities,
entities
which
which
means
means
the
the
tooling
tooling
can
can
auto
auto
complete
complete
your
your
query
query
as
as
you
you
type
type
it
it
out
out
in
in
your
your
editor.
editor
This
this
has
has
been
been
GraphQL
graphql
in
in
100
100
seconds.
seconds
If
if
you
you
wanna
wanna
see
see
more
more
short
short
videos
videos
like
like
this,
this
make
make
sure
sure
to
to
like
like
and
and
subscribe,
subscribe
and
and
turn
turn
on
on
notifications
notifications
because
because
there
there
is
is
a
a
lot
lot
more
more
on
on
the
the
way.
way
Thanks
thanks
for
for
watching,
watching
and
and
I
i
will
will
see
see
you
you
in
in
the
the
next
next
one.
one
success
In this video, the speaker explains the benefits of GraphQL, a query language for graphite-based APIs. GraphQL has a single entry point and allows for multiple fields to be handled by the front end developers. It has a single entry point and can be used in any programming language. A mutation type is required for each query type, and the tooling can auto complete the query once it is written in the editor. Viewers are encouraged to like and subscribe to the video and turn on notifications for more short videos.
GraphQL Explained in 100 Seconds
GraphQL, a query language for reading and mutating data in APIs. As a back end developer, GraphQL provides a type system where you can describe a schema for your data. In turn, this gives front end consumers of the API the power to explore and request the exact data they need. Traditionally, web developers have consumed APIs using REST, where data entities live on a bunch of URLs on a server. When a request is received, the API responds with the full data payload of that entity. That sounds simple enough, but there are 2 potential drawbacks we may need multiple entities at one time, in which case, each request is under fetching the actual data we want. In other cases, we may only want a small subset of a data entity, in which case, we need to over fetch from the API. And that, of course, is bad for the environment. How dare you. Instead of multiple URLs, a GraphQL API has a single entry point. Data is queried or fetched by describing it with a syntax that mirrors its return shape in JSON. The front end developer describes the data they want while the back end developer writes code to resolve the request, and and it all happens in a syntax that can work with any programming language, we can start defining a schema with our own custom objects using the type keyword. A type can have multiple fields like a unique ID and we'll make that required with a bang. Let's also give it integer and string values, then create a relationship with another type. A creator can have many videos which we can represent by wrapping the type in brackets. On the flip side, a video belongs to a reader. Now every GraphQL API has a query type, which is the main entry point for a consumer of the API. We can query a list of videos or an individual user based on their ID. That's how a consumer reads data, but they may also want to mutate data. In which case, we implement a mutation type that defines how data can be modified on the API. From there, we can define code to resolve this data in any programming language. Once deployed, any developer consuming this API I will be able to explore it with a complete understanding of all possible queries and data entities, which means the tooling can auto complete your query as you type it out in your editor. This has been GraphQL in 100 seconds. If you wanna see more short videos like this, make sure to like and subscribe, and turn on notifications because there is a lot more on the way. Thanks for watching, and I will see you in the next one.
In this video, the speaker explains the benefits of GraphQL, a query language for graphite-based APIs. GraphQL has a single entry point and allows for multiple fields to be handled by the front end developers. It has a single entry point and can be used in any programming language. A mutation type is required for each query type, and the tooling can auto complete the query once it is written in the editor. Viewers are encouraged to like and subscribe to the video and turn on notifications for more short videos.

        [INST]
        You are youtuber called Fireship you make engaging high-intensity and entertaining coding tutorials and tech news. 
        you covers a wide range of topics relevant to programmers, aiming to help them learn and improve their skills quickly.
        
        Given the title of the video : GraphQL Explained in 100 Seconds 
        and a small summary : In this video, the speaker explains the benefits of GraphQL, a query language for graphite-based APIs. GraphQL has a single entry point and allows for multiple fields to be handled by the front end developers. It has a single entry point and can be used in any programming language. A mutation type is required for each query type, and the tooling can auto complete the query once it is written in the editor. Viewers are encouraged to like and subscribe to the video and turn on notifications for more short videos.
        [/INST]
        
        Generate the video : GraphQL, a query language for reading and mutating data in APIs. As a back end developer, GraphQL provides a type system where you can describe a schema for your data. In turn, this gives front end consumers of the API the power to explore and request the exact data they need. Traditionally, web developers have consumed APIs using REST, where data entities live on a bunch of URLs on a server. When a request is received, the API responds with the full data payload of that entity. That sounds simple enough, but there are 2 potential drawbacks we may need multiple entities at one time, in which case, each request is under fetching the actual data we want. In other cases, we may only want a small subset of a data entity, in which case, we need to over fetch from the API. And that, of course, is bad for the environment. How dare you. Instead of multiple URLs, a GraphQL API has a single entry point. Data is queried or fetched by describing it with a syntax that mirrors its return shape in JSON. The front end developer describes the data they want while the back end developer writes code to resolve the request, and and it all happens in a syntax that can work with any programming language, we can start defining a schema with our own custom objects using the type keyword. A type can have multiple fields like a unique ID and we'll make that required with a bang. Let's also give it integer and string values, then create a relationship with another type. A creator can have many videos which we can represent by wrapping the type in brackets. On the flip side, a video belongs to a reader. Now every GraphQL API has a query type, which is the main entry point for a consumer of the API. We can query a list of videos or an individual user based on their ID. That's how a consumer reads data, but they may also want to mutate data. In which case, we implement a mutation type that defines how data can be modified on the API. From there, we can define code to resolve this data in any programming language. Once deployed, any developer consuming this API I will be able to explore it with a complete understanding of all possible queries and data entities, which means the tooling can auto complete your query as you type it out in your editor. This has been GraphQL in 100 seconds. If you wanna see more short videos like this, make sure to like and subscribe, and turn on notifications because there is a lot more on the way. Thanks for watching, and I will see you in the next one.
        