1.0.0 • Published 5 years ago

@onedaycat/gqlimport v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

gqlscalars

Use gqlgen

Installation

go get -u github.com/onedaycat/gqlscalars/...

Custom Scalars

In .gqlgen.yml point to the name without the Marshal|Unmarshal in front:

models:
  AWSJSON:
    model: github.com/onedaycat/gqlscalars.AWSJSON

Add type in gqaphql schema

scalar AWSJSON

Query {
  ...
}

Mutation {
  ...
}

Run cmd on directory which graphql schema

gqlscalars

Schema Directives

If you get missing ditrective error, add directive in graphql schema

directive @aws_subscribe(mutations: [String]!) on FIELD_DEFINITION

Graphql Import

Read doc

Installation

npm install -g @onedaycat/gqlimport

Usage

gqlimport <root_schema> <to_schema>
Example: gqlimport ./main.graphql ./schema.graphql