Socket
Socket
Sign inDemoInstall

graphql-compose-json

Package Overview
Dependencies
5
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.0.0 to 6.1.0

51

package.json
{
"name": "graphql-compose-json",
"version": "6.0.0",
"version": "6.1.0",
"description": "This is a plugin for `graphql-compose`, which generates GraphQLTypes from any JSON.",

@@ -25,31 +25,30 @@ "files": [

"peerDependencies": {
"graphql-compose": "^7.0.4"
"graphql-compose": "^7.0.4 || ^8.0.0"
},
"devDependencies": {
"@types/express": "4.17.4",
"@types/express": "4.17.11",
"@types/express-graphql": "^0.9.0",
"@types/graphql": "^14.5.0",
"@types/jest": "26.0.10",
"@types/node": "14.6.0",
"@types/node-fetch": "2.5.7",
"@typescript-eslint/eslint-plugin": "3.9.1",
"@typescript-eslint/parser": "3.9.1",
"cross-env": "7.0.2",
"eslint": "7.7.0",
"eslint-config-airbnb-base": "14.2.0",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-import": "2.22.0",
"eslint-plugin-prettier": "3.1.4",
"@types/jest": "26.0.23",
"@types/node": "15.0.1",
"@types/node-fetch": "2.5.10",
"@typescript-eslint/eslint-plugin": "4.22.0",
"@typescript-eslint/parser": "4.22.0",
"cross-env": "7.0.3",
"eslint": "7.25.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-prettier": "3.4.0",
"express": "^4.17.1",
"express-graphql": "0.11.0",
"graphql": "15.3.0",
"graphql-compose": "7.19.4",
"jest": "26.4.0",
"node-fetch": "^2.6.0",
"prettier": "2.0.5",
"express-graphql": "0.12.0",
"graphql": "15.5.0",
"graphql-compose": "8.0.1",
"jest": "26.6.3",
"node-fetch": "2.6.1",
"prettier": "2.2.1",
"rimraf": "3.0.2",
"semantic-release": "17.1.1",
"ts-jest": "26.2.0",
"ts-node": "8.10.2",
"typescript": "3.9.7"
"semantic-release": "17.4.2",
"ts-jest": "26.5.5",
"ts-node": "9.1.1",
"typescript": "4.2.4"
},

@@ -63,3 +62,3 @@ "scripts": {

"tscheck": "tsc --noEmit",
"test": "cross-env NODE_ENV=test npm run coverage && npm run lint",
"test": "cross-env NODE_ENV=test yarn coverage && yarn lint",
"semantic-release": "semantic-release",

@@ -66,0 +65,0 @@ "fixture-demo": "ts-node ./src/__fixtures__/app.ts"

@@ -172,15 +172,13 @@ # graphql-compose-json

const PeopleTC = composeWithJson('People', jsonData);
PeopleTC.addResolver({
name: 'findById',
type: PeopleTC,
args: {
id: 'Int!',
},
resolve: rp => {
return fetch(`https://swapi.co/api/people/${rp.args.id}/`).then(r => r.json());
},
});
schemaComposer.Query.addFields({
person: PeopleTC.getResolver('findById'),
person: {
type: PeopleTC,
args: {
id: 'Int!',
},
resolve: (_, args) => {
return fetch(`https://swapi.co/api/people/${args.id}/`).then(r => r.json());
},
},
});

@@ -187,0 +185,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc