This repository has been archived by the owner on Jan 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
# effect-utils | ||
|
||
A utility for working with Effect. This package is intended for internal use only. | ||
|
||
## API | ||
|
||
### `executeEffect(effect, runtime?)` | ||
|
||
Execute the given Effect using `runPromiseExit`. It returns the value when result is `Exit.Success<A>`. and it throws the value if result is failure. | ||
|
||
And it resolve `Option<A>` value into `A | null`. | ||
|
||
## License | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
{ | ||
"name": "effect-utils", | ||
"version": "0.0.1", | ||
"description": "A utility library for working with Effect", | ||
"description": "A utility for working with Effect", | ||
"type": "module", | ||
"publishConfig": { | ||
"access": "public", | ||
"registiry": "https://registry.npmjs.org" | ||
}, | ||
"files": [ | ||
"package.json", | ||
"README.md", | ||
"dist" | ||
], | ||
"files": ["package.json", "README.md", "dist"], | ||
"main": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
|
@@ -27,9 +23,7 @@ | |
"prepack": "yarn build", | ||
"publish": "yarn npm publish" | ||
}, | ||
"keywords": [ | ||
"effect" | ||
], | ||
"keywords": ["effect"], | ||
"author": { | ||
"name": "Chanhee Lee", | ||
"email": "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,28 @@ | ||
# envelop-execute-effect | ||
# graphql-effect | ||
|
||
Make your GraphQL Schema to allow use Effect. | ||
|
||
## Install | ||
|
||
``` | ||
$ yarn add graphql-effect | ||
``` | ||
|
||
## Usage | ||
|
||
```ts | ||
import { enableExecuteEffect } from "graphql-effect"; | ||
|
||
declare const yourSchema: import("graphql").GraphQLSchema; | ||
const schema = enableExecuteEffect(yourSchema); | ||
``` | ||
|
||
## API | ||
|
||
### `enableExecuteEffect(schema, runtime?)` | ||
|
||
Converts the given `GraphQLSchema`. The `Effect.Effect` will be available as a result of the field resolver. | ||
|
||
## License | ||
|
||
MIT |