scalar

package module
v0.0.0-...-e92e7a1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: MIT Imports: 8 Imported by: 0

README

gqlgen-scalar

Golang gqlgen scalar values for time UUID

Usage

Add package to go

Run go get github.com/Z-M-Huang/gqlgen-scalar

Modify .graphqls

Add below lines in your .graphqls

scalar RFC3339
scalar Timestamp
scalar UUID
Add package reference

Add last line in autobind section:

autobind:
  - "github.com/your-name/your-application/graph/model"
  - "github.com/Z-M-Huang/gqlgen-scalar"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalRFC3339

func MarshalRFC3339(t time.Time) graphql.Marshaler

MarshalRFC3339 scalar

func MarshalTimestamp

func MarshalTimestamp(t time.Time) graphql.Marshaler

MarshalTimestamp scalar

func UnmarshalRFC3339

func UnmarshalRFC3339(v interface{}) (time.Time, error)

UnmarshalRFC3339 scalar

func UnmarshalTimestamp

func UnmarshalTimestamp(v interface{}) (time.Time, error)

UnmarshalTimestamp scalar

func UnmarshalUUID

func UnmarshalUUID(v interface{}) (uuid.UUID, error)

UnmarshalUUID scalar

Types

This section is empty.

Jump to

Keyboard shortcuts

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