Skip to Content
JavaScript Everywhere
book

JavaScript Everywhere

by Adam D. Scott
February 2020
Intermediate to advanced
344 pages
6h 37m
English
O'Reilly Media, Inc.
Content preview from JavaScript Everywhere

Chapter 23. GraphQL and React Native

At the Andy Warhol Museum in Pittsburgh, Pennsylvania, there is a permanent installation called “Silver Clouds.” The installation is a sparse room with a dozen or so rectangular foil balloons, each filled with a mix of helium and regular air. The result is that the balloons will stay suspended longer than balloons filled with atmospheric air, but don’t float to the ceiling like helium balloons. Patrons of the museum walk through the museum, playfully batting the balloons to keep them afloat.

Currently, our application is much like the room of “clouds.” It’s enjoyable to playfully click the icons and navigate around the app shell, but in the end it is a mostly empty room (no offense to Mr. Warhol). In this chapter, we’ll begin to fill our application by first exploring how we can display content with React Native’s list views. We’ll then make use of Apollo Client to connect to our data API. Once we’ve connected, we’ll write GraphQL queries, which will display data on an app screen.

Running Our API Locally

The development of our mobile application will require access to a local instance of our API. If you’ve been following along with the book, you may already have the Notedly API and its database up and running on your machine. If not, I’ve added instructions in the book’s Appendix A on how to get a copy of the API up and running along with some sample data. If you already have the API running, but would like some additional data to work with, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

The Joy of JavaScript

The Joy of JavaScript

Luis Atencio

Publisher Resources

ISBN: 9781492046974Errata Page