Skip to content
 
 

Repository files navigation

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

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

About

Seamless integration between the Pothos GraphQL and Effect.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages