🦄 giin v0.1.1
🦄 Have a Graphql client's feature: query and mutation
import { giin } from 'giin';
// const { giin } = require('giin');
giin({
option: {
url: 'https://example.com'
},
query: `
query {
user(id: $id) {
id
name
age
}
}
`,
variables: {
id: 1
}
});
👻 Special 🚧: giin allows passing parameters as objects.
giin({
option: {
url: 'https://example.com'
},
query: `
query {
user(info: $info) {
id
name
sex
age
address
job
}
}
`,
variables: {
info: {
name: 'Cuong Duy Nguyen',
address: 'Ho Chi Minh'
}
}
});