Categorygithub.com/nrfta/go-graphql-scalars
modulepackage
0.3.0
Repository: https://github.com/nrfta/go-graphql-scalars.git
Documentation: pkg.go.dev

# README

go-graphql-scalars

A collection of GraphQL (gqlgen) Scalars with SQLBoiler's null support

Install

go get -u "github.com/nrfta/go-graphql-scalars"

Usage

# scalars.graphql

"The `Date` is a date in the format YYYY-MM-DD"
scalar Date

"The `DateTime` is a date in the format ISO 8601 format: `2006-01-02T15:04:05Z07:00`"
scalar DateTime

scalar JSON
# gqlgen.yml

schema:
  - "./*.graphql"

models:
  # -- Start Scalars --
  String:
    model:
      - github.com/99designs/gqlgen/graphql.String
      - github.com/nrfta/go-graphql-scalars.NullString
  Boolean:
    model:
      - github.com/99designs/gqlgen/graphql.Boolean
      - github.com/nrfta/go-graphql-scalars.NullBoolean
  Float:
    model:
      - github.com/99designs/gqlgen/graphql.Float
      - github.com/nrfta/go-graphql-scalars.NullFloat64
  Int:
    model:
      - github.com/99designs/gqlgen/graphql.Int
      - github.com/99designs/gqlgen/graphql.Int32
      - github.com/99designs/gqlgen/graphql.Int64
      - github.com/nrfta/go-graphql-scalars.NullInt
  Date:
    model:
      - github.com/nrfta/go-graphql-scalars.Date
      - github.com/nrfta/go-graphql-scalars.NullDate
  DateTime:
    model:
      - github.com/nrfta/go-graphql-scalars.DateTime
      - github.com/nrfta/go-graphql-scalars.NullDateTime
  # -- End Scalars --

License

This project is licensed under the MIT License.

# Functions

No description provided by the author
No description provided by the author
MarshalJSON implements the graphql.Marshaler interface for JSON.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UnmarshalJSON implements the graphql.Unmarshaler interface for JSON.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

JSON represents a custom scalar for raw JSON data.