GQL Builder
Programmatically Graphql Query Builder Component
Install Package
npm install gql-builder
Features
- Simple usage
- Query support
- Mutation support
- Nested fields support
Usage Examples
Query Example 1
String Usage
'query { user { id name }}'
GqlBuilder Usage
const qb = ;qb;qb;
GqlBuilder Alternative Usage
const qb = ;qb;qb;
Query Example 2
String Usage
'query { user { id name country { code name } }}'
GqlBuilder Usage
const qb = ;qb;qb;
GqlBuilder Alternative Usage
const qb = ;qb ;qb;
Query Example 3
String Usage
'query ($id: 'Int') { user (id: $id) { id name country { code name } }}'
GqlBuilder Usage
const qb = ;qb;qb;
GqlBuilder Alternative Usage
const qb = ;qb ;qb;
Mutation Example 1
String Usage
'mutation ($user: User_Input) { createUser (user: $user) { id name }}'
GqlBuilder Usage
const qb = ;qb;qb;
GqlBuilder Alternative Usage
const qb = ;qb;qb;
Mutation Example 2
String Usage
'mutation ($id: Int, $name: String, $gender: String) { updateUser (id: $id, user: { name: $name gender: $gender }) { id name gender }}'
GqlBuilder Usage
const qb = ;qb;qb;
GqlBuilder Alternative Usage
const qb = ;qb;qb;