Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fetch-graphql

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-graphql - npm Package Compare versions

Comparing version 0.0.0 to 0.1.0

19

index.js

@@ -1,3 +0,16 @@

exports.printMsg = function() {
console.log("This is a message from the demo package");
}
function fetchGraphQL(url, headers, query, variables) {
return new Promise((resolve, reject) => {
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
...headers
},
body: JSON.stringify({ query, variables })
})
.then(response => resolve(response.json()))
.catch(error => reject(error));
})
}
export default fetchGraphQL;

2

package.json
{
"name": "fetch-graphql",
"version": "0.0.0",
"version": "0.1.0",
"description": "GraphQL fetch client",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc