This Repo is for the Dallas React User Group talk on 8/13/2019.
The goal is to talk about getting started with GQL and Apollo
This workshop will get you up and running with a small app that uses GraphQL. For this app, we will be using the Countries API (https://countries.trevorblades.com/). Visit that URL to visit the Countries API's GraphQL playground. In the playground, you can explore the schema.
- Clone this repo
- Run an
- Create a countries query that gets the following:
- languages (name and native)
- Set up a Query component
- Set up
CountriesDisplaycomponent to render countries data
This repo already has the necessary dependencies as part of the packages.json. Just run
npm install or
yarn install while in the
gql_workshop folder and your dependencies should install. That said, if you want to start from scratch, you will need the following dependencies:
apollo-cache-inmemory apollo-client apollo-link-http graphql graphql-anywhere graphql-tag qs react-apollo
- Note: These dependencies are required for this specific project. As you venture out on other GraphQL projects, your dependencies will vary depending on your needs.
- To use the "freshly out of beta" graphql-hooks from Apollo, you will want to install
Official GraphQL Docs: https://graphql.org/learn/
Apollo GraphQL Docs: https://www.apollographql.com/docs/
How To GraphQL: https://www.howtographql.com/
Learning GraphQL (book): http://shop.oreilly.com/product/0636920137269.do
Popular GraphQL APIs: https://github.com/APIs-guru/graphql-apis
Apollo Client Dev Tools (Chrome extension): https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm?hl=en-US