Skip to content

marcinkoziej/codegen-graphql-scalar-locations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code gen scalar locations

This is a plugin for Codegen which finds custom scalars in your schema and outputs a spanning tree of their positions in 1. argument types and 2. query and mutation results

This information can be used for instance to serialize/deserialize the custom scalars with urql-serialize-scalars-exchange

Usage

Add as dev dependency, and configure in your codegen.yml:

overwrite: true
schema: "schema/schema.graphql"
generates:
  ./src/queries/scalarLocations.ts:
    plugins:
      - graphql-scalar-locations
    config:
      scalars: 
        - Json
        - NaiveDateTime
        - Date

See doc for urql-serialize-scalars-exchange on how to use it in this exchange.

About

graphql codegen plugin to find custom scalar locations in schema

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published