Code Monkey home page Code Monkey logo

jraph's Introduction

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's People

Contributors

ianfabs avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

gitter-badger

jraph's Issues

Support GraphQL subscriptions

Given the goal of this project is to act as mostly-full replacement for apollo client in javascript projects, it seems only fair that jraph supports GraphQL Subscriptions as well. This task will not only require some research on my part, but a lot of work into making sure that users aren’t forced to import something with a feature that’s useless to them. So code-splitting must be designed and implemented properly as well. I am also toying with the notion of supporting graphql server creation. Though I think that is outside the scope of this project.

Apollo

I have an issue with this appearing to be an Apollo wannabe

A Major Decision

So, I've created two versions of jraph. The version in master is the version available on NPM now. The other version, is under the gql branch. You can look at either to view the syntax difference, if you'd like. I need your help to decide what version stays and what version goes, or for another solution. My solution so far is to publish a nice and polished version with the current syntax, and then publish a new major version with the new syntax.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.