Skip to content

typescript-cheatsheets/graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

graphql-typescript-cheatsheet

Resources for End-to-End typing with GraphQL and TypeScript

Notes

There is something informally called the "keying-in" operator that is very handy for accessing generated TypeScript types from your GraphQL schema.

// generated typescript response from schema
type APIResponse = {
  user: {
    userId: string
    friendList: {
      count: number
    }
  }
}
you need to the type of APIResponse.user.friendList but don't know it upfront
type FriendList = APIResponse['user']['friendList']

It looks kinda obvious but can be really handy.

Libraries

Podcasts

About

(seeking maintainers) Resources for End-to-End typing with GraphQL and TypeScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy