New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

superagent-graphql

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superagent-graphql

Shortcut plugin for making a GraphQL query with SuperAgent

latest
npmnpm
Version
0.1.2
Version published
Weekly downloads
3.5K
31.02%
Maintainers
1
Weekly downloads
 
Created
Source

#Superagent Suffix Middleware Middleware to add a suffix to superagent request url

##Installation

npm install --save superagent-graphql

##Example

var request = require('superagent');
var ql = require('superagent-graphql');

    const queryString = `
        query Authenticate($id: String!, $password : String!)
        {
            authenticate(id: $id, password: $password)
        }
    `

    const queryVars = {
        id: "123",
        password: "456" 
    }


request
    .post("/graphql")
    .use(ql(queryString,queryVars))
    .end((err,res)=>{
        //...
    })

Keywords

superagent

FAQs

Package last updated on 17 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts