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

bazaar-graphql

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bazaar-graphql - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

package.json
{
"name": "bazaar-graphql",
"version": "0.0.2",
"version": "0.0.3",
"description": "",

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

@@ -26,4 +26,2 @@ const {

const getResourceClassfication = async (id, sbot) => {

@@ -145,2 +143,23 @@ const resourceClassification = await message({ id }, sbot)

const Mutation = {
publishResource: async (_, { input }, { sbot }) => {
const classification = await publish(Object.assign({ type: resourceClassficationType }, {
category: input.category
}), sbot)
.then(msg => Object.assign({ key: msg.key }, msg.value.content ))
const prices = getPrices(input.prices)
return publish(Object.assign({ type: economicResourceType, createdDate: new Date() }, {
currentOwner: input.owner,
prices: input.prices,
resourceClassifiedAs: classification.key
}), sbot)
.then(msg => {
return {
key: msg.key,
category: classification.category,
prices,
user: msg.value.content.currentOwner,
}
})
},
unpublishResource: async (_, { id }, { sbot }) => {

@@ -147,0 +166,0 @@ const affectedResource = await getEconomicResource(id, sbot)

@@ -45,2 +45,7 @@ const Price = `

const Mutation = `
input ResourceInput {
category: String!
owner: String!
prices: [String]
}
input TransactionInput {

@@ -54,2 +59,3 @@ provider: String!

type Mutation {
publishResource(input: ResourceInput): Resource
unpublishResource(id: String!): Resource

@@ -56,0 +62,0 @@ transaction(input: TransactionInput): Transaction

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