codegen-graphql-scalar-locations
TypeScript icon, indicating that this package has built-in type declarations

1.0.1-0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i codegen-graphql-scalar-locations

Weekly Downloads

210

Version

1.0.1-0

License

MIT

Unpacked Size

61.6 kB

Total Files

17

Last publish

Collaborators

  • procafoundation