
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Fast and easy to use GraphQL Client.
# With npm:
npm install astraql
# With yarn:
yarn add astraql
import { CacheLoader, GraphQLClient, query } from 'astraql';
// Initialize client.
const client = new GraphQLClient({
endpoint: 'https://graphql.anilist.co',
// Optional authentication:
headers: {
'Authorization': 'bearer xxxxxxxxxxxx'
},
// Optional cache (in seconds)
cache: new CacheLoader({ expiresIn: 60 }),
});
// Create a query.
const characterQuery = query`
Character($id: Int) {
Character(id: $id) {
id
name {
first
last
}
gender
age
}
}
`;
// Send request.
client.fetch(characterQuery, { id: 128986 })
.then(console.log);
// If uses require function you will need to use .default
// For import in typescript, this is not required
const { GraphQLClient, query } = require('astraql').default;
Contributions, issues and feature requests are welcome! Feel free to check issues page.
Give a ⭐️ if this project helped you!
Or buy me a coffeelatte 🙌🏾
FAQs
Fast and easy to use GraphQL Client.
The npm package astraql receives a total of 17 weekly downloads. As such, astraql popularity was classified as not popular.
We found that astraql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.