Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gqlgenfn GitHub license

A small sets of useful function for gqlgen.com grqphql module with Gin Gonic.

Installation

go get github.com/ubgo/gqlgenfn

GinContextToContextMiddleware() gin.HandlerFunc

Make the GIN Context available within Gqlgen Context

router.Use(gql_fn.GinContextToContextMiddleware())

GinContextFromContext(ctx context.Context) (*gin.Context, error)

return the GIN Context from the Gqlgen Context

gc, err := gql_fn.GinContextFromContext(ctx)
if err != nil {
  return false
}

Contribute

If you would like to contribute to the project, please fork it and send us a pull request. Please add tests for any new features or bug fixes.

Stay in touch

License

goutil is Apache-2.0 licensed.