v1.6
Generates GraphQL client types, based on the schema introspection
Repository
Current version released
3 years ago
Dependencies
std
Gen. GraphQL Client
Work with your graphql endpoints type-safed way.
The script will do the schema introspection and next map it to typescript types.
How to use
Minimal:
deno run -A https://deno.land/x/gen_graphql/gen.ts http://localhost:5000/graphqlAdvanced:
deno run -A https://deno.land/x/gen_graphql/gen.ts -e http://localhost:5000/graphql -o src/graphql.generated.ts --prefix GqlParams
-e- GraphQL endpoint url-o- Generated output file path (defaultgraphql.generated.ts)--prefix- Prefix for generated types--enums- Generate enums instead of ts union types for GraphQL Enums--defaultFragment- Generate default fragments for queries with all fields (level 1 only)