1.3.0-beta.1 • Published 3 years ago
@unlikelystudio/simpleql v1.3.0-beta.1
Inspired by graphql-request by Prisma.
Getting started
npm i @unlikelystudio/simpleql
import SimpleQL from '@unlikelystudio/simpleql'
import gql from 'graphql-tag'
const client = new SimpleQL('https://api.unlikely.studio')
const query = `
query Projects {
projects(first: 3) {
edges {
node {
title
description
image {
src
width
height
}
}
}
}
}
`
// OR
const query = gql`
query Projects {
projects(first: 3) {
edges {
node {
title
description
image {
src
width
height
}
}
}
}
}
`
const query = await client.query({
query,
})
Typescript users
You can add types to your query response.
interface Person {
name: string
}
const query = await client.query<Person>({
query,
})
1.3.0-beta.1
3 years ago
1.3.0-beta.0
4 years ago
1.2.1
4 years ago
1.2.0
4 years ago
1.1.3
4 years ago
1.1.2
4 years ago
1.1.1
4 years ago
1.1.0
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago