Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Why GraphQL: A React Developer's Perspective

Why GraphQL: A React Developer's Perspective

React Bangalore Meetup May 2018

Praveen Durairaj

May 19, 2018
Tweet

More Decks by Praveen Durairaj

Other Decks in Programming

Transcript

  1. What is GraphQL • Query Language • Declarative, Type safe

    • Server-side runtime • Better REST ? 3
  2. • Type-safe schema with introspection • Endpoint is the same

    - /graphql • Always fetch what you want • Versioning made easy Let that sink in! 4
  3. const typeDefs = ` type CityWeather { temp: String min_temp:

    String max_temp: String city_name: String! applicable_date: String! } type Query { cityWeather(city_name: String! applicable_date: String): CityWeather } `; 5
  4. • Type-safe schema with introspection • Endpoint is the same

    - /graphql • Always fetch what you want • Versioning made easy Let that sink in! 6
  5. 7

  6. • Type-safe schema with introspection • Endpoint is the same

    - /graphql • Always fetch what you want • Versioning made easy Let that sink in! 8
  7. • Type-safe schema with introspection • Endpoint is the same

    - /graphql • Always fetch what you want • Versioning made easy Let that sink in! 9
  8. 10

  9. 19

  10. Downsides? - Exposing db / api schema to client -

    Managing schema - Moving the load server side 21