►
From YouTube: NEAR + Bundlr + Arweave Querying Arweave using GraphQL
Description
Hey Nearians,
This workshop walks you through using NEAR to upload data on Arweave, in this workshop, we will build a public square app using React a NEAR Wallet, the bundler network, and Arweave. The tutorial is broken down into several bite-size videos, that are 20 - 30 minutes long on average.
Tutorial Repository: https://github.com/twilson63/public-square-app
Arweave Dev Discord: https://discord.gg/928jQzsA
About Presenter: Tom Wilson - twilson632 on Discord
A
A
Each
transaction
is
made
up
of
some
data
as
well
as
headers
or
metadata,
and
these
metadata
attributes
can
be
used
in
a
graph
ql
query
to
essentially
search
the
entire
r-weave
system
and
bring
back
specific
transactions
to
to
list
and
view.
In
our
case,
we
want
to
search
the
are
we
network
and
find
all
the
transactions
that
have
the
tag,
app
name
equal
to
public
square,
and
then
that
would
return
all
the
transactions
created
in
the
public
square
and
then
we
would
have
to
call
those
transactions
by
their
identifier
to
get
the
data.
A
A
A
Cool,
so
if
we
open
a
tab
at
that
endpoint,
so
we
have
it
right
here
we
get
this
graphql
playground
and
the
the
graphql
playground
allows
us
to
essentially
write
graphql
queries
against
the
r
weave
network
and
get
results,
and
we
can
kind
of
as
developers
build
out
the
query
that
we
want.
So
when
we
first
start,
we
can
just
write
a
query
and
we
can
use
control
space
and
a
pop-up
will
show
up
and
it'll
give
us
kind
of
the
documentation
or
the
schema
that
we
can
use
on
this
graphql
server.
A
So
here
we
want
to
get
transactions
and
and
just
like
any
blockchain
rweave
uses
transactions,
and
then
those
transactions
are
stored
in
a
block
and
then
that
block
is
chained
to
the
previous
block
right.
So
you
can
also
search
for
pacific
blocks,
which
would
give
you
a
list
of
transactions
that
are
included
in
that
block.
A
But
most
of
the
time
for
our
application,
we'll
be
querying
transactions,
and
what
we'll
want
to
do
is
you
know,
find
transactions
that
match
a
certain
tag:
filter
so
and
and
we'll
get
edges
back
and
then
in
those
edges
there
will
be
a
node
and
then,
in
that
node
we
get
access
to
our
transaction
data.
So
that's
pretty
cool
and
these
docs
can
can
help.
A
But
I
think
once
you
get
the
hang
of
it,
you'll
be
able
to
just
do
control
space
and
say
I
want
transactions,
and
then
I
want
tags
and
the
the
help
helps
a
lot.
So
there
we
go,
we're
gonna
do
name
and
the
one
thing
that
gets
me
all
the
time
is
is
you've
got
to
use,
double
quotes
in
graphql,
no
single
quotes
so
with
name.
We
want
to
say
at
name
and
then
values
is
an
array
of
items
and
we
want
to
say
public
square
right
and
they
are
case
sensitive.
A
A
A
Now
we
can
add
another
input
here
called
first
and
we
can
request
up
to
a
hundred
transactions.
So
with
our
weave,
it's
only
set
up
to
give
a
max
of
a
hundred,
and
then
you'd
have
to
use
pagination
to
get
the
the
rest
of
the
results
right.
So
you
would
have
like
a
load
more
button
that
would
get
the
rest
now
we're
getting
the
first
100.
Let's
just
change
it
back
to
the
first
10,
either
way
both
are
pretty
fast
but
see
some
other
options
on
the
output.
So
the
transaction
id
is
one
option.
A
A
Okay
and
we
can
get
back
the
block
right
and
the
id
of
that
block
and
timestamp
of
that
block.
A
A
Now
we
can
take
that
graphql
query
and
put
it
into
our
code
and
and
use
essentially
a
fetch
or
an
axios
post
to
call
the
graphql
endpoint
and
return
our
results
just
like
we're
doing
with
the
playground.
A
A
If
can.
A
A
Then
you
have
some
filter
criteria
and
then
you
have
the
structure
of
the
results.
So
if
we
look
at
the
the
playground
we
see,
we
have
the
schema
name
transactions
and
then
we
have
some
filter
criteria
and
then
we
have
the
results
and
we
can
choose
what
kind
of
shape
and
you
you'll
notice
over
here
on
the
right
that
the
results
come
back
and
you
have
data,
so
it'll
always
come
back
with
data
and
then
it
will.
The
shape
will
mirror
the
shape
of
your
output,
so
we'll
have
transactions,
edges,
node
id
owner,
etc.
A
Okay,
one
thing
of
note:
the
public
square
protocol
that
we'll
be
using
was
created
by
the
r
weave
team
founder
sam
williams.
You
can
access
it
through
this
github
snippet,
it's
pretty
cool,
but
you
won't
really
need
to
know
much
for
this
tutorial.
But
you
should
check
that
out.
You'll
notice
that
graphql
only
returns
the
header
properties
right.
We
don't
get
the
actual
data
so
in
order
to
get
the
data
we'll
have
to
take
the
transaction
id
and
just
call
rwev.net
with
the
transaction
id.
A
A
So
if
you
want
to
dig
more
into
everything,
you
can
do
with
the
rweave
http
api
check
out
the
api
documentation,
but
for
the
most
part,
we're
going
to
use
an
rwe,
js
library
to
do
our
stuff.
But
before
we
get
started
with
that,
we're
going
to
head
over
to
our
project
and
open
it
up
in
visual
studio
code
and
we're
going
to
work
on
the.
A
The
r
weave
query
we're
going
to
create
our
first
r
weave
query
in
our
app.
So
let's
go
over
to
our
project
and
let's
open
up
source
lib
js
and
we
have
this
function
on
line.
23
called
build
query,
so
we're
going
to
get
rid
of
this
cons,
query
object
or
actually
we
can
just
edit
it
right.
So
we're
going
to
edit
that
and
like
we
said
when
we
submit
an
object,
it's
got
to
have
the
the
keyword
query
and
then
it's
got
the
graphql
query.
A
So
we're
going
to
use
the
backtick
so
that
we
can
kind
of
type
out
the
query
and
if
we
need
to
kind
of
inject
any
kind
of
data
points
we
can
do
that.
But
for
this
one
we're
not
going
to
inject
anything.
Quite
yet
so
we'll
say
query.
A
A
So
we
want
to
query
transactions,
that's
our
schema
type
and
we
want
to
get
the
first
100
and
we'll
add
a
comma
and
we'll
say
we
want
to
get
some
tags
and
we
want
the
tags
and
that's
a
good
question.
So
we
want
to
get
two
tags.
One
is
the
app
name,
it's
public
square
and
then
the
the
other
is
content,
type
text
plain
and
the
reason
we
want
to
get
content
type
text
plain.
A
We
want
to
filter,
for
that
is
other
people
use
this
app
and
may
publish
content
like
images
or
json
or
other
kinds
of
things,
and
when
you
publish
content
onto
ourweave,
it's
important
to
set
this
content
type
to
identify
what
it
is,
because
that
lets
the
gateways
know
what
it
is
and
it
can
distribute
that
data
back
appropriately
to
the
browser
or
to
to
your
application.
A
A
Text
point
and
then
end
array,
okay,
cool.
So
that
way
I
can
add
multiple
tags
that
I
want
to
filter
on
and
that's
what
we
want
to
do.
So
we
want
an
array
here
and
we
want
to
say
name
and
remember:
double
quotes,
app,
dash,
name
values
and
it's
plural,
because
this
array,
we
could
add
multiple
values
like
we
could
say,
public
square
public
cube.
A
Cool,
so
we've
got
our
filter
criteria
and
now
we
just
have
to
define
our
output
of
what
we
want
return.
So
we
want
edges
and
we
want
a
node
and
on
that
node
we
want
the
id
the
owner,
address,
the
data
size,
the
block
height
and
timestamp,
and
tags
name
and
value.
That's
what
we
want
cool,
so
we've
got
our
build
query
function
now
this
function
just
basically
takes
this
string
and
returns
it.