@shitty-scope-name/hasura-testing-client-example-for-tests
v1.3.0
Published
Graphql client
Downloads
5
Readme
@shitty-scope-name/hasura-testing-client-example-for-tests
Your awesome graphql client ❤️
Example usage
import { createClient } from '@shitty-scope-name/hasura-testing-client-example-for-tests'
const client = createClient()
client
.query({
user: {
age: true,
name: true,
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))
client
.query({
user_aggregate: {
aggregate: {
var_pop: {
age: true,
},
},
},
user: {
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,
},
{
name: true,
},
],
})
.then(x => console.log(JSON.stringify(x, null, 4)))
client
.query({
user: {
age: true,
id: true,
name: true,
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))