1 of 28

Introducing

sograph

Robert Balicki ◆ Pinterest, ex-Relay

@StatisticsFTW ◆ robert.balicki@gmail.com

@isographlabs

github.com/isographlabs/isograph

#isograph on GraphQL discord

2 of 28

Why am I excited?

  • Developer experience
  • Power tools
  • Precise control over data

3 of 28

Building robust and performant data-driven apps is too damn frustrating

4 of 28

5 of 28

How to extract a child component

  • name child fragment
  • select fields
  • select prop name
  • import type for fragment reference
  • include type for fragment reference in prop types
  • read fragment reference
  • extract into its own file
  • pick a file name
  • pick a component name

  • spread child fragment
  • remove unused fields
  • pass fragment reference as prop
  • import child JavaScript
  • render child

6 of 28

Data masking

7 of 28

Developer inefficiency

  • Fragment name
  • Fragment reference prop name
  • Reading the fragment reference
  • Spread child fragment + import JavaScript
  • Pass fragment reference

8 of 28

Query servers

or

isolate components

9 of 28

Each fragment is associated with exactly one function

10 of 28

How to extract a child component

  • extract into its own file
  • pick a name
  • select fields
  • select child component
  • remove unused fields
  • render child component

11 of 28

12 of 28

Resolvers are

GraphQL's missing primitive

13 of 28

Everything is

a resolver

14 of 28

15 of 28

🚫

16 of 28

17 of 28

Data masking

18 of 28

@defer data and

code together

19 of 28

Is this data

onscreen? 🤔

20 of 28

Choose when to

load resolvers

21 of 28

Server execution

22 of 28

Conditionally load resolvers

23 of 28

DevTools

24 of 28

Robert's

Pet List 3000™

25 of 28

FEATURE

COMPLETE

🎉

🎉

🎉

26 of 28

27 of 28

Roadmap (in no particular order)

  • Docs
  • VSCode extension
  • Compiler watch mode
  • Fetch policies
  • Garbage collection
  • Preloaded queries
  • Fetch/cache policies
  • Granular re-renders
  • Traditional refetch fields
  • Defer/stream
  • Subscriptions
  • Interfaces/unions
  • Entrypoints
  • Field unwrapping syntax
  • Pagination
  • Refetch on missing data
  • Compile to non-GraphQL
  • Actually validate variables
  • Error reporting (compiler)
  • Persisted queries
  • Suspense for mutations
  • Suspense for refetch
  • Strongly typed ID fields
  • Custom normalizers
  • Lazy normalization ASTs
  • Fetching off of typed IDs
  • Magic mutation/refetch field customizability
  • Stateful resolvers
  • Compiler executable for Mac/�Windows/Linux
  • Unit tests
  • E2E tests
  • Network request errors
  • Proper missing field handlers
  • Missing field handlers from�schema definitions
  • Store held in context
  • Imperative store APIs
  • Typesafe updaters
  • Sample router integration
  • Emit new field definitions�for GraphiQL and other tools
  • Field groups
  • Lint rules to enforce e.g. export
  • Guide for testing Isograph�components
  • Support non-globally unique IDs
  • Iso lang code mods
  • Iso lang syntax highlighting
  • Iso lang auto-format
  • Separate artifacts for fetching�and reading fetchable resolvers
  • Incremental compilation
  • Saved state
  • Support strict mode?
  • Load resolvers iff needed
  • Object literals as variables
  • Server support for�JSResource
  • Injectable code for�@component
  • Isograph dev tools
  • Experiment with�context and JSX�for @component
  • Vue/Svelte/etc.�integration
  • Compile compiler�to Wasm
  • IR explorer
  • Code sandbox example
  • Non-fetchable�fragments
  • Topological sort in�compiler
  • Validate no infinite�recursion
  • Statically prune�inaccessible branches
  • Bug fix: Not all files in�one folder
  • TypeScript errors in�emitted artifacts
  • Better repr. of nullable�types in compiler
  • Babel integration for�iso literal values
  • Typescript integration�for type inference of iso�literals
  • Parallelize artifact gen�etc.

28 of 28

Introducing

sograph

Robert Balicki ◆ Pinterest, ex-Relay

@StatisticsFTW ◆ robert.balicki@gmail.com

@isographlabs

github.com/isographlabs/isograph

#isograph on GraphQL discord