Skip to content

Latest commit

 

History

History
34 lines (19 loc) · 1.35 KB

README.md

File metadata and controls

34 lines (19 loc) · 1.35 KB

CSharp template

Experimental GraphQL code generator template for C# projects using instructions provided at this site.

This template reads the introspection JSON of a GraphQL schema as an input. The user has to also mention the output folder where the file has to be written

The name of the output file can be defined in src/config.ts

Usage

For executing the template, install graphql-code-generator first. See the install instructions here or you can go through the steps below.

Open command prompt and go to working directory.

Execute yarn add -D [email protected] [email protected] [email protected]

Clone graphql-codegen-csharp in this directory

cd graphql-codegen-csharp

npm install

Execute a yarn build from the template folder so that a dist folder is created in it.

cd ..

Execute yarn gql-gen --schema "graphQL schema JSON path" --template graphql-codegen-csharp --out "output folder path".

Other CLI Flag options are listed here.