From 1440d05c46ac4b4ebe5db950b64f1e4c9501b01a Mon Sep 17 00:00:00 2001 From: Kevin Suen Date: Wed, 27 Apr 2022 01:16:48 -0700 Subject: [PATCH] Add example to README --- README.markdown | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.markdown b/README.markdown index cd4aec0..d6d0f40 100644 --- a/README.markdown +++ b/README.markdown @@ -6,6 +6,19 @@ This is a [graphql-code-generator](https://graphql-code-generator.com/) plugin t This plugin generates a [`possibleTypes` object](integration/graphql-types.ts) defining possible types which implement interfaces, [needed by Apollo](https://www.apollographql.com/docs/react/data/fragments/#defining-possibletypes-manually) +## Example +```sh +npm i @homebound/graphql-typescript-possible-types +``` + +**codegen.yml** +```yml +generates: + integration/graphql-types.ts: + plugins: + - node_modules/@homebound/graphql-typescript-possible-types +``` + ## Contributing In order to develop changes for this package, follow these steps: