Light version of @saltyaom/gql at 500 bytes.
Should be around 500 bytes, checkout Bundlephobia for accurate result.
yarn add @saltyaom/gq
// Or npm
npm install @saltyaom/gq --save
import gql, { client } from '@saltyaom/gq'
client.config('http://api.opener.studio/graphql')
gql(`
query GetHentaiById($id: Int!) {
getHentaiById(id: $id) {
success
data {
title {
display
}
}
}
}
`,
{
variables: {
id: 177013
}
}).then((data) => console.log(data))
Y'll made GraphQL too complex and heavy.
I just want to fetch GraphQL query here.
import gql, { client } from '@saltyaom/gq'
client.config('http://api.opener.studio/graphql')
gql(`
query GetHentaiById($id: Int!) {
getHentaiById(id: $id) {
success
data {
title {
display
}
}
}
}
`,
{
variables: {
id: 177013
}
}).then((data) => console.log(data))