# README
Gqlmodel 
Gqlmodel custom models for gqlgen.com grqphql module.
Installation
go get github.com/ubgo/gqlmodel
Note: If you are getting error modelgen: unable to find type github.com/ubgo/gqlmodel.UidScalar
then create a new go file or use existing go file and add below code
import _ github.com/ubgo/gqlmodel
Models Support
- uuid.UUID
How to Use
- Edit the
gqlgen.yml
file and add the code like this undermodels
Uid:
model: github.com/ubgo/gqlmodel.UidScalar
- Under your
schema.graphqls
file add thisscalar Uid
- Now you can use the UUID like this:
type Category {
id: Uid!
name: String!
}
You will see the model file generated as following:
type Category struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
}
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
- Author - Aman Khanakia
- Website - https://khanakia.com
License
goutil is MIT licensed.
# Functions
No description provided by the author
It will receive the value from the user and we can validate it before sending to the func This function will be execute only if type is defnied NON NULL i.e UID!.