1.1.17 • Published 11 months ago

unify-elysia-gql v1.1.17

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

unify-elysia-gql

Library to have GraphQL generic errors from unify-error library.

Support :

Usage

import { pluginUnifyElysiaGraphQL } from 'unify-elysia-gql';
const { handleQueryAndResolver } = pluginUnifyElysiaGraphQL(config);

const server = new Elysia()
  .use(
    yoga({
      typeDefs: `
        type Query {
          BadRequest: String!
        }
      `,
      resolvers: {
        Query: {
          BadRequest: handleQueryAndResolver(() => {
            throw new BadRequest({
              issue: 'This is the issue',
            });
          }),
        },
      },
    }),
  );

Return

namedescription
handleQueryAndResolverMap query and/or resolver callback
handleQueriesAndResolversMap array of queries and/or resolvers callback

Plugin options

namedefaultdescription
logInstanceundefined(OPTIONAL) Pino or Console or @bogeychan/elysia-logger instance
disableDetailsfalseDisable error details like stack
disableLogfalseDisable logging on error

Tests

To execute jest tests (all errors, type integrity test)

bun test
1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.12

12 months ago

1.1.11

12 months ago

1.1.10

1 year ago

1.1.16

12 months ago

1.1.15

12 months ago

1.1.14

12 months ago

1.1.13

12 months ago

1.1.17

11 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.2

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago