When building a GraphQL application, there are benefits that come from placing your GraphQL query documents in their own files rather than inline with your view components. For example, you can get simpler editor and tooling support since the tools can look at static files instead of trying to parse application code. Also, it prevents you from accidentally manipulating queries at runtime. However, until now it has been difficult to do with our GraphQL webpack loader since there was no way to have different queries share GraphQL fragments.

#graphql #graphql documents #webpack’ing

Webpack’ing your GraphQL Documents
1.10 GEEK