go-gqlgen-helpers

module
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2025 License: MIT

README

go-gqlgen-helpers

Install

go get -u "github.com/nrfta/go-gqlgen-helpers"
GraphQL gqlgen error handling

// ...
router.Handle("/graphql",
  handler.GraphQL(
    NewExecutableSchema(Config{Resolvers: &Resolver{}}),
    errorhandling.ConfigureErrorPresenterFunc(reportErrorToSentry),
    errorhandling.ConfigureRecoverFunc(),
  ),
)

// ...

func reportErrorToSentry(ctx context.Context, err error) {
  // Whatever
}

License

This project is licensed under the MIT License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL