
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.
@krzysztofkarol/swagger-to-graphql
Advanced tools
Swagger2GraphQL converts your existing Swagger schema to GraphQL types where resolvers perform HTTP calls to certain real endpoints. It allows you to move your API to GraphQL with nearly zero afford and maintain both: REST and GraphQL APIs.
Swagger2GraphQL converts your existing Swagger schema to GraphQL types where resolvers perform HTTP calls to certain real endpoints. It allows you to move your API to GraphQL with nearly zero afford and maintain both: REST and GraphQL APIs.
const express = require('express');
const app = express();
const graphqlHTTP = require('express-graphql');
const graphQLSchema = require('swagger-to-graphql');
graphQLSchema('./petstore.json').then(schema => {
app.use('/graphql', graphqlHTTP(() => {
return {
schema,
context: {
GQLProxyBaseUrl: API_BASE_URL
},
graphiql: true
};
}));
app.listen(3009, 'localhost', () => {
console.info(`API is here localhost:3009/graphql`);
});
}).catch(e => {
throw e;
});
npm i -g swagger-to-graphql
swagger-to-graphql --swagger=/path/to/swagger_schema.json > ./types.graphql
...
context: {
GQLProxyBaseUrl: API_BASE_URL,
BearerToken: req.get('authorization')
},
...
FAQs
Swagger2GraphQL converts your existing Swagger schema to GraphQL types where resolvers perform HTTP calls to certain real endpoints. It allows you to move your API to GraphQL with nearly zero afford and maintain both: REST and GraphQL APIs.
We found that @krzysztofkarol/swagger-to-graphql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.