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

graphql-genie

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-genie - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

11

lib/FortuneGraph.js

@@ -272,3 +272,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

this.generateUpdates = (fortuneTypeName, record, options = {}) => {
const updates = { id: this.getFortuneId(record['id']), replace: {}, push: {}, pull: {} };
const updates = { id: this.getFortuneId(record['id']) };
for (const argName in record) {

@@ -285,5 +285,11 @@ const link = get(this.store, `recordTypes.${fortuneTypeName}.${argName}.link`);

if (options['pull']) {
if (!updates.pull) {
updates.pull = {};
}
updates.pull[argName] = arg;
}
else {
if (!updates.push) {
updates.push = {};
}
updates.push[argName] = arg;

@@ -296,2 +302,5 @@ }

}
if (!updates.replace) {
updates.replace = {};
}
updates.replace[argName] = arg;

@@ -298,0 +307,0 @@ }

2

package.json
{
"name": "graphql-genie",
"version": "0.1.3",
"version": "0.1.4",
"description": "GraphQL Genie",

@@ -5,0 +5,0 @@ "browser": "./lib/browser.umd.js",

@@ -8,2 +8,9 @@ import { atob, btoa } from 'abab';

import { computeRelations } from './TypeGeneratorUtilities';
interface FortuneUpdate {
id: string;
push?: object;
replace?: object;
pull?: object;
}
export default class FortuneGraph implements DataResolver {

@@ -302,4 +309,4 @@

private generateUpdates = (fortuneTypeName: string, record, options: object = {}) => {
const updates = { id: this.getFortuneId(record['id']), replace: {}, push: {}, pull: {} };
private generateUpdates = (fortuneTypeName: string, record, options: object = {}): FortuneUpdate => {
const updates: FortuneUpdate = { id: this.getFortuneId(record['id']) };
for (const argName in record) {

@@ -316,4 +323,10 @@ const link = get(this.store, `recordTypes.${fortuneTypeName}.${argName}.link`);

if (options['pull']) {
if (!updates.pull) {
updates.pull = {};
}
updates.pull[argName] = arg;
} else {
if (!updates.push) {
updates.push = {};
}
updates.push[argName] = arg;

@@ -325,2 +338,5 @@ }

}
if (!updates.replace) {
updates.replace = {};
}
updates.replace[argName] = arg;

@@ -327,0 +343,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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