0.0.1 • Published 5 years ago

decorated-graph v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

A GraphQL client written in typescript, consumable through decorators.

Usage:

import {GQLprop} from 'decorated-graph';

class Myclass {

  @GQLprop({endpoint: 'http://server:8080/graphql'}) gql:any;

  async myMethod() {

    const query = '{a:{b c d}}';
    const result = await this.gql.query({query});
    
    //returns
    //{success:true, data: {a:{b:1, c:1, d:1}}
  }
}

GQLprop A property decorator is provided to instantiate the client.

0.0.2

5 years ago

0.0.1

5 years ago