1.0.4 • Published 5 years ago

shadows-graphql-query v1.0.4

Weekly downloads
6
License
ISC
Repository
github
Last release
5 years ago

graphql-query

A formatter-utils for graphql-query

const gql_query = require('shadows-graphql-query');

// simple query
const queryStr = gql_query({
  categoryList: ['title', 'description']
});
/**
  { categoryList { title description } }
*/

// multiple query
const queryStr = gql_query({
  categoryList: ['title', 'description'],
  productList: ['title', 'price']
});
/**
  { categoryList { title description } productList { title price } }
*/

// params query
const queryStr = gql_query({
  categoryList: {
    params: { page: 1, pageSize: 10 },
    query: ['title', 'description']
  }
});
/**
  { categoryList ( page: 1, pageSize: 10 ) { title description } }
*/
1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago