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

graphql-helper

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-helper - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

4

lib.js

@@ -109,3 +109,3 @@ 'use strict';

var query = 'mutation ' + capitalized + '($input: ' + inputType + '!) {\n ' + name + '(input: $input) {\n clientMutationId\n ... on ' + payloadType + ' ' + String.raw.apply(String, [target].concat(values)) + '\n }\n } ' + fragmentDefinitions;
var query = 'mutation ' + capitalized + '($input: ' + inputType + '!) {\n payload: ' + name + '(input: $input) {\n clientMutationId\n ... on ' + payloadType + ' ' + String.raw.apply(String, [target].concat(values)) + '\n }\n } ' + fragmentDefinitions;

@@ -115,2 +115,4 @@ var fn = function fn(variables) {

}, variables)
}).then(function (data) {
return Promise.resolve(data.payload);
});

@@ -117,0 +119,0 @@ };

{
"name": "graphql-helper",
"version": "0.0.4",
"version": "0.0.5",
"description": "A simple helper library for making GraphQL queries. For browser usage, ensure that you have a Promise polyfill.",

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

@@ -239,3 +239,19 @@ # graphql-helper

```js
const paginationPartial = GraphQL.partial `
edges {
cursor
node {
${Card.fragment}
}
}
pageInfo {
hasNextPage
}
`
const query = GraphQL.query('MyQuery') `{
topicConnection {
${paginationPartial}
}
}`
```

@@ -242,0 +258,0 @@

@@ -88,3 +88,3 @@ /* @flow */

const query = `mutation ${capitalized}($input: ${inputType}!) {
${name}(input: $input) {
payload: ${name}(input: $input) {
clientMutationId

@@ -101,3 +101,3 @@ ... on ${payloadType} ${String.raw(target, ...values)}

}
)
).then(data => Promise.resolve(data.payload))

@@ -104,0 +104,0 @@ fn.queryString = query

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