GraphQL Builder
A simple string utility to build GraphQL queries.
🔑 Features:
- Automatically interpolates and includes fragment definitions into queries
- Define fragments/queries/mutations as objects so you can extend them
Examples:
Strings with fragment interpolation
const PostAuthorFragment = const PostQuery = console/*query ($id: Int!) { post (id: $id) { id title author { ...PostAuthor } }} fragment PostAuthor on User { id name}*/
Building with all options
const PostAuthorFragment = const PostQuery = console/*query PostQuery ($id: Int!) { post (id: $id) { id title author { ...PostAuthor } }} fragment PostAuthor on User { id name}*/