February 23, 2020
Feb 2020 GraphQL Meetup Notes
- NodeJS dataloader library for batching DB queries, how to use dataloaders
- Can Apollo generate warnings on deprecated fields? Maybe, need to learn more about schema directives.
- One schema, one folder. No shared schema between different apps, choose isolation over DRY
- What can be shared? Custom scalar types, an error type, a currency object
- Separate errors into user errors from public errors (clarify the difference)
- Testing graphql? Prefer integration tests to unit tests to see if your actual relationships are working. Mocking too many things gets you incorrect results.
- Soo many libraries!
- @Shopify/react-graphql
- graphql-mini-transforms has smaller output than
graphql-tag
to keep bundles smaller - graphql-fixtures helps generate mock data based on schemas to help your integration tests
- @shopify/graphql-testing can help you check queries/mutations have run in integration tests