Socket
Book a DemoInstallSign in
Socket

soap-graphql

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

soap-graphql

Create a GraphQL schema from a WSDL-defined SOAP endpoint.

Source
npmnpm
Version
4.0.0-alpha.0
Version published
Weekly downloads
15
-74.14%
Maintainers
0
Weekly downloads
 
Created
Source

soap-graphql

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.

This package is fully dependend on the node-soap package. It will only work in a Node.js environment.

Usage

Main entry point is the function soapGraphqlSchema(options: SoapGraphqlOptions | string): Promise<GraphQLSchema>

See code comments for more details.

Example

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`);
    });
});

Keywords

soap

FAQs

Package last updated on 28 Jan 2025

Did you know?

Socket

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.

Install

Related posts