1.0.5 • Published 7 months ago

@gymlib/codegen-swap-directive v1.0.5

Weekly downloads
112
License
MIT
Repository
-
Last release
7 months ago

What is this?

This graphql-codegen plugin is a wrapper around the existing typescript plugin.

How to use?

You need to add the following directive

directive @swap(for: String) on FIELD_DEFINITION

on your SDL definitions.

Then you will have to add the plugin as a replacement for the typescript plugin.

Example

type SomeType {
  field1: SomeOtherType!
  field2: String! @swap(for: "SomeOtherType")
}

The output will look like this:

type SomeOtherType = /*...*/;
type SomeType = {
  field1: SomeOtherType;
  field2: SomeOtherType;
}

Publishing a new version to NPM

New versions can be automatically published to NPM by creating a new release (recommended) or pushing a new tag.

1.0.8

7 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

2 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago