/react-apollo-typescript

GraphQL Meetup 5.0 source code

Primary LanguageTypeScript

GraphQL BKK 5.0

Live coding session presented in the GraphQL BKK meetup on 20/03/2019.

Setup

yarn install
yarn start

Development step by step

  1. Install create-react-app
  2. create-react-app graphqlbkk --typescript
  3. Explore the Github API
  4. Create a token in https://github.com/settings/tokens
  5. Add packages react-apollo apollo-boost graphql
  6. Endpoint https://api.github.com/graphql
  7. Display my username
  8. Fetch organization by name and display repositories with stars count
  9. Add interfaces manually
  10. Github Schema Workaround https://raw.githubusercontent.com/octokit/graphql-schema/master/schema.graphql
  11. Install graphql-code-generator graphql-codegen-typescript-common graphql-codegen-typescript-client graphql-codegen-typescript-react-apollo
  12. Add types with graphql-code-generator
  13. Show the generator features
  14. Done 🎉