@homebound/graphql-typescript-possible-types

This is a graphql-code-generator plugin that generates types for implementating an Apollo-/graphql-style implementation in TypeScript.

Usage no npm install needed!

<script type="module">
  import homeboundGraphqlTypescriptPossibleTypes from 'https://cdn.skypack.dev/@homebound/graphql-typescript-possible-types';
</script>

README

NPM

This is a graphql-code-generator plugin that generates types for implementating an Apollo-/graphql-style implementation in TypeScript.

Overview

This plugin generates a possibleTypes object defining possible types which implement interfaces, needed by Apollo

Contributing

In order to develop changes for this package, follow these steps:

  1. Make your desired changes in the src directory

  2. Adjust the example files under the integration directory to use your new feature.

  3. Run npm run build, to create a build with your changes

  4. Run npm run graphql-codegen, and verify the output in graphql-types.ts matches your expected output.