0.0.1 • Published 6 years ago
graphql-xs v0.0.1
GraphQL XS
Xtra small (48 bytes minified/gzip'd) GraphQL client for Javascript.
import { client } from 'graphql-xs';
/** Likely generated by Apollo CLI or QuickType */
interface Starship {
name: string;
hyperdriveRating: number;
}
const query = `{
Starship(name: $starshipName) {
name
hyperdriveRating
}
}`
const starship = client({
uri: 'https://api.graphcms.com/simple/v1/swapi',
}).query<Starship>(query, {
starshipName: 'Millenium Falcon'
});
0.0.1
6 years ago