0.1.0 • Published 6 months ago

@identity-flow/binding-graphql v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

@identity-flow/binding-graphql

Provides GraphQL bindings for IdentityFlow.

Introduction

The @identity-flow/binding-graphql package provides GraphQL bindings for IdentityFlow, enabling seamless integration with GraphQL APIs.

For more advanced features and additional tools, consider using the @identity-flow/sdk package. It provides a comprehensive set of utilities to enhance your workflow development experience. This package is included in @identity-flow/sdk.

Installation

To install the package, use the following command:

npm install @identity-flow/binding-graphql

Usage

Here is a basic example of how to use the GraphQL bindings with IdentityFlow:

import { createGraphQLBinding } from '@identity-flow/binding-graphql';

const GraphQL = createGraphQLBinding({
	endpoint: 'https://your-graphql-endpoint.com/graphql',
	headers: { Authorization: 'Bearer your-token' },
});

// Use the binding in your workflow
export default defineWorkflow('myWorkflow', async (flow) => {
	const result = await flow.do('use graphql', async ({ use }) => {
		return await use(GraphQL).request(`query { hello }`);
	});

	return { result };
});

License

This project is licensed under the MIT License - see the LICENSE file for details.

0.1.0

6 months ago