New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sofa-api

Package Overview
Dependencies
Maintainers
4
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sofa-api - npm Package Compare versions

Comparing version 0.18.0 to 0.18.1-alpha-20231123170130-56a56a6

cjs/package.json

35

package.json
{
"name": "sofa-api",
"version": "0.18.0",
"version": "0.18.1-alpha-20231123170130-56a56a6",
"description": "Create REST APIs with GraphQL",

@@ -11,5 +11,5 @@ "sideEffects": false,

"@graphql-tools/utils": "^10.0.0",
"@whatwg-node/fetch": "^0.9.0",
"@whatwg-node/fetch": "^0.9.14",
"fets": "^0.6.4",
"ansi-colors": "^4.1.3",
"fets": "^0.2.0",
"openapi-types": "^12.1.0",

@@ -36,19 +36,26 @@ "param-case": "^3.0.4",

"license": "MIT",
"main": "index.js",
"module": "index.mjs",
"typings": "index.d.ts",
"main": "cjs/index.js",
"module": "esm/index.js",
"typings": "typings/index.d.ts",
"typescript": {
"definition": "index.d.ts"
"definition": "typings/index.d.ts"
},
"type": "module",
"exports": {
".": {
"require": "./index.js",
"import": "./index.mjs"
"require": {
"types": "./typings/index.d.cts",
"default": "./cjs/index.js"
},
"import": {
"types": "./typings/index.d.ts",
"default": "./esm/index.js"
},
"default": {
"types": "./typings/index.d.ts",
"default": "./esm/index.js"
}
},
"./*": {
"require": "./*.js",
"import": "./*.mjs"
},
"./package.json": "./package.json"
}
}
}

64

README.md

@@ -353,12 +353,12 @@ [![sofa](https://user-images.githubusercontent.com/25294569/63839869-bfac8300-c988-11e9-978e-6b6c16c350de.gif)](https://www.sofa-api.com)

},
tags: [
{
name: 'Book',
description: 'Book related operations',
},
{
name: 'Author',
description: 'Author related operations',
},
],
tags: [
{
name: 'Book',
description: 'Book related operations',
},
{
name: 'Author',
description: 'Author related operations',
},
],
});

@@ -370,6 +370,6 @@ ```

export class BookResolver {
@Query(() => Book, { description: 'Get book by id' }) // custom summary tag
getBookById(@Arg('id', () => Int) id: number) {
return 'book';
}
@Query(() => Book, { description: 'Get book by id' }) // custom summary tag
getBookById(@Arg('id', () => Int) id: number) {
return 'book';
}
}

@@ -380,23 +380,23 @@ ```

const routes: SofaConfig['routes'] = {
'Query.getBookById': {
method: 'POST',
path: '/book/:id',
tags: ['Book'],
description: 'This is a custom detailed description for getBookById',
},
}
'Query.getBookById': {
method: 'POST',
path: '/book/:id',
tags: ['Book'],
description: 'This is a custom detailed description for getBookById',
},
};
const createSofaMiddleware = (
schema: GraphQLSchema,
openApi: ReturnType<typeof OpenAPI>,
basePath = ''
schema: GraphQLSchema,
openApi: ReturnType<typeof OpenAPI>,
basePath = ''
): ReturnType<typeof useSofa> => {
return useSofa({
routes,
basePath,
schema,
onRoute(info) {
openApi.addRoute(info, { basePath });
},
});
return useSofa({
routes,
basePath,
schema,
onRoute(info) {
openApi.addRoute(info, { basePath });
},
});
};

@@ -403,0 +403,0 @@ // writes every recorder route

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