Fragments: GraphQL's Copy-Paste on Steroids
· 7 min read

You're copying the same fields across 17 different queries. Your code reviewer is crying. Your future self is plotting revenge. Enter fragments: the DRY principle applied to GraphQL queries.

You're copying the same fields across 17 different queries. Your code reviewer is crying. Your future self is plotting revenge. Enter fragments: the DRY principle applied to GraphQL queries.