jraph
TypeScript icon, indicating that this package has built-in type declarations

3.3.7 • Public • Published

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 bundlephobia total downloads

Build Status last commit license

graphql

NPM

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

    import {jraph} from 'jraph';
    const gql = jraph("https://csb-xpwq1o2824-xravvsjkul.now.sh/");
 
    async function getItems(){
        return gql`{
           items{
              title
              info
           }
        }
        `
    }

/jraph/

    Package Sidebar

    Install

    npm i jraph

    Weekly Downloads

    5

    Version

    3.3.7

    License

    MIT

    Unpacked Size

    12.8 kB

    Total Files

    15

    Last publish

    Collaborators

    • ianfabs