Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
soap-graphql
Advanced tools
Readme
Create a GraphQL schema from a WSDL-defined SOAP endpoint.
The created GraphQL schema contains all types declared in the WSDL and provides all operations of the SOAP endpoint as GraphQL mutation fields. This enables you to re-publish a SOAP endpoint as a GraphQL server. This might be convenient for clients, that already handle GraphQL and do not want to handle SOAP. But note: The existence of this package should not necessarily encourage you to do this ... but it is possible.
This package is fully dependend on the node-soap package. It will only work in a Node.js environment.
Checkout soap-graphql-demo for a quick demo.
import * as express from 'express';
import * as expressGraphql from 'express-graphql';
import { GraphQLSchema } from 'graphql';
import { soapGraphqlSchema } from 'soap-graphql';
soapGraphqlSchema("http://<<url to wsdl>>").then((schema: GraphQLSchema) => {
const app: express.Application = express();
app.use('/graphql', expressGraphql({
schema: schema,
graphiql: true,
}));
app.listen(4000, () => { console.log(`serving graphql on http://localhost:4000/graphql`) });
});
Main entry point is the function soapGraphqlSchema(options: SoapGraphqlOptions | string): Promise<GraphQLSchema>
See code comments for more details.
There is no guarantee that this package will work with every valid WSDL.
node-soap-graphql.spec lists SOAP endpoints that were tested with this package. It also shows how to configure custom behavior for SOAP endpoints.
Feel free to post an issue (or better yet: create a pull request with a test case) if this package does not work with your SOAP endpoint.
WSDL, and especially the XSD-based schema section, allows a wide variety of options to define primitive types. Handling of these options are only implemented in the most basic way; see DefaultTypeResolver
.
In most cases you can handle the specifics of your SOAP endpoint by implementing a CustomTypeResolver
.
FAQs
Create a GraphQL schema from a WSDL-defined SOAP endpoint.
The npm package soap-graphql receives a total of 2 weekly downloads. As such, soap-graphql popularity was classified as not popular.
We found that soap-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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.