@shitty-scope-name/dsfxxxxxaxaxa
v1.1.0
Published
Graphql client
Downloads
3
Readme
@shitty-scope-name/dsfxxxxxaxaxa
Your awesome graphql client ❤️
Example usage
import { createClient } from '@shitty-scope-name/dsfxxxxxaxaxa'
const client = createClient()
client
.query({
user: {
name: true,
},
user_aggregate: {
nodes: {
age: true,
name: true,
},
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))
// variables
var query_root__user_by_pk__id
client
.query({
user_by_pk: [
{
id: query_root__user_by_pk__id,
},
{
age: true,
id: true,
},
],
user: {
age: true,
id: true,
name: true,
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))
// variables
var query_root__user_by_pk__id
client
.query({
user_by_pk: [
{
id: query_root__user_by_pk__id,
},
{
id: true,
name: true,
},
],
user_aggregate: {
aggregate: {
min: {
name: true,
},
avg: {
age: true,
},
max: {
age: true,
},
stddev: {
age: true,
},
stddev_pop: {
age: true,
},
sum: {
age: true,
},
var_pop: {
age: true,
},
variance: {
age: true,
},
},
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))
client
.query({
user_aggregate: {
nodes: {
id: true,
name: true,
},
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))