Rock-solid components with typescript and Graphql

@mwarger

Hi, I'm mat warger

professional coder

Some Background

Java, .Net, Javascript

What's the plan?

  • Types
  • TypeScript
  • GraphQL

WHY TYPES?

dna for your data

A better editor!

TYPES

TOOLS

=

WHY TYPESCRIPT?

A spectrum of type systems...

What is TypeScript?

Definition

TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.  

meaning

Type annotations provide advanced features and tools to allow a better development experience.  Bugs can be caught at compile-time instead of run-time.

Examples

strings

objects

arrays

typeof keyword

tooling assistance

How do I get started?

.js[x]

.ts[x]

WHY GRAPHQL?

what is GRAPHQL?

What does it look like?

demo

the bigger picture

common questions

  • Won't it take longer to develop features?
    • Like tests, adding types can appear like extra overhead
    • Types can take the place of tests - tests should not take the place of types
  • I've tried TypeScript before, and it was a pain.  What's changed?
    • Framework and library support has improved drastically
    • Javascript ecosystem moves quickly, and so has TypeScript adoption
    • Most libraries worth using have boarded the TypeScript train

source: rollbar

TLDR

USE TYPES
AVOID "ANY"
MOSTLY GENERATED

TYPES

TOOLS

=

Resources

Thank you!

@mwarger

slides + code

Rock-Solid Components with TypeScript and GraphQL

By Mat Warger

Rock-Solid Components with TypeScript and GraphQL

This presentation covers advantages and tools related to using TypeScript and GraphQL to create awesome applications. Demo code is available at https://github.com/mwarger/graphql-typescript-react-demo.

  • 1,214