1.0.3 • Published 2 years ago

react-express-graphql v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Browser Support

ChromeFirefoxSafariOperaEdgeIE
Latest ✔Latest ✔Latest ✔Latest ✔Latest ✔11 ✔

Installing

Package manager

Using npm:

$ npm install react-express-graphql

Once the package is installed, you can import the library using import approach:

import {query , mutation} from "react-express-graphql"

Example for Query

import { query } from "react-express-graphql"

// Define the query

 let querystring=`
    category() {
        _id  
      }
    `
// Make a request for a query 
let baseurl="http://localhost:7002/graphql"

// Store the response
const response = await query(baseurl, querystring);

Example for Mutation

import { mutation } from "react-express-graphql"

// Define the mutation

let mutationstring= `
    createCategory(categoryInput: $CategoryInput) {
        _id
        email,         
    }
    `
// Make a request for a query 
let baseurl="http://localhost:7002/graphql"
const response = await mutation(baseurl, mutationstring);

License

MIT

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago