Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ianfabs/jraph
A simple fetch-wrapper for making GraphQL API calls in a jiff!
https://github.com/ianfabs/jraph
fetch fetch-api graphql isomorphic-fetch isomorphic-javascript javascript typescript vanilla-js
Last synced: 2 months ago
JSON representation
A simple fetch-wrapper for making GraphQL API calls in a jiff!
- Host: GitHub
- URL: https://github.com/ianfabs/jraph
- Owner: ianfabs
- License: mit
- Created: 2018-11-14T22:29:38.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-29T20:59:05.000Z (over 1 year ago)
- Last Synced: 2024-10-03T06:07:59.627Z (3 months ago)
- Topics: fetch, fetch-api, graphql, isomorphic-fetch, isomorphic-javascript, javascript, typescript, vanilla-js
- Language: JavaScript
- Homepage:
- Size: 78.1 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# jraph
## A simple fetch-wrapper for making GraphQL API calls in a jiff!Designed to feel similar to using apollo's graphql-tag function.
[![version](https://badgen.net/npm/v/jraph)](https://badgen.net/npm/v/jraph)
[![bundlephobia](https://badgen.net/bundlephobia/minzip/jraph)](https://bundlephobia.com/[email protected])
[![total downloads](https://badgen.net/npm/dt/jraph)](https://badgen.net/npm/dt/jraph)[![Build Status](https://travis-ci.org/ianfabs/jraph.svg?branch=master)](https://travis-ci.org/ianfabs/jraph)
[![last commit](https://badgen.net/github/last-commit/ianfabs/jraph)](https://badgen.net/github/last-commit/ianfabs/jraph)
[![license](https://badgen.net/github/license/ianfabs/jraph)](https://badgen.net/github/license/ianfabs/jraph)[![graphql](https://badgen.net/badge//graphql?icon=graphql)](https://badgen.net/badge//graphql?icon=graphql)
[![NPM](https://nodei.co/npm/jraph.png?mini=true)](https://nodei.co/npm/jraph/)
### Options
Jraph takes two parameters
- #### URL
- a URL string, this should be the URL to your graph-ql endpoint
- #### Options
- Basically just fetch params
- Only works with post-requests right now please bear with me.#### Basic Example
```js
import {jraph} from 'jraph';
const gql = jraph("https://csb-xpwq1o2824-xravvsjkul.now.sh/");async function getItems(){
return gql`{
items{
title
info
}
}
`
}
```