modulepackage
2.2.0+incompatible
Repository: https://github.com/asif-mahmud/graphqlgin.git
Documentation: pkg.go.dev
# README
GraphQL handler for gin
This is a small package to provide a GraphQL handler that can be used with Gin Framework.
Features
- Fully tested.
- Supports context managers so user can add their application specific data to be used in resolver functions.
- Supports file upload out of the box.
- Fully compliant with GraphQL multipart specification, so client libraries like Apollo Upload Client will work out of the box.
- Allows adding additional http headers either by gin middleware, or right from the resolver functions.
Installation
To add the package to your project run -
go get -u github.com/asif-mahmud/graphqlgin
Documentation
godoc: https://pkg.go.dev/github.com/asif-mahmud/graphqlgin examples: https://pkg.go.dev/github.com/asif-mahmud/graphqlgin#pkg-examples
# Functions
Extracts and returns the current `*gin.Context` value from the context `ctx`.
Returns a `ContextProviderFn` that will add the current `*gin.Context` value to the context passed down to resolver functions.
Constructs a new GraphQL app.
# Constants
Key for setting `*gin.Context` value of the current request to the context.
# Variables
GraphQL scalar to represent file upload variable.
# Structs
GraphQL app structure.
GraphQL request parameters including file upload maps and operations.
Basic GraphQL request parameters.
# Type aliases
Function to update or modify the context passed down to the resolver functions.