@enalmada/pothos-plugin-effect
v0.8.1-pull28.1
Published
Seamless integration between the Pothos GraphQL and Effect.
Downloads
2
Readme
pothos-plugin-effect
Seamless integration between the Pothos GraphQL and Effect.
Hello World!
import SchemaBuilder from '@pothos/core';
import EffectPlugin from 'pothos-plugin-effect';
import { Effect, Random } from 'effect';
const builder = new SchemaBuilder({
plugins: [EffectPlugin],
});
builder.queryFields(t => ({
roll: t.effect({
type: 'Int',
resolve() {
// $ExpectType Effect.Effect<never, never, number>
return Random.nextIntBetween(1, 6);
},
}),
}));
Documentations
- Getting Started
- Context Management
- Integration with Relay Plugin
- Integration with Errors Plugin
- Integration with Prisma Plugin
Acknowledges
- Pothos by @hayes (GitHub/Docs) - A nice GraphQL Schema builder. I heavily relied on the README for this project and The documentation of the plugin implementation is excellent.
- Effect (GitHub/Docs)
Contributors
Made with contrib.rocks.
Licenses
MIT