# @julr/gql-generator-full-blown-preset

> 🛩 A cool and opinionated base configuration for graphql-code-generator.

Latest version **0.0.2** (published 2022-07-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @julr/gql-generator-full-blown-preset
pnpm add @julr/gql-generator-full-blown-preset
yarn add @julr/gql-generator-full-blown-preset
bun add @julr/gql-generator-full-blown-preset
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2022-07-06 |
| First published | 2022-07-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 8 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Julien Ripouteau |
| Maintainers | julien-r44 |
| Keywords | graphql, graphql-code-generator |

## Links

- npm: https://www.npmjs.com/package/@julr/gql-generator-full-blown-preset
- Repository: https://github.com/Julien-R44/gql-generator-full-blown-preset
- Homepage: https://github.com/Julien-R44/gql-generator-full-blown-preset#readme
- Issues: https://github.com/Julien-R44/gql-generator-full-blown-preset/issues
- Funding: https://github.com/sponsors/Julien-R44
- npm.io page: https://npm.io/package/@julr/gql-generator-full-blown-preset

## Dependencies (8)

- [graphql-config](https://npm.io/package/graphql-config.md) ^4.3.1
- [@graphql-codegen/add](https://npm.io/package/@graphql-codegen/add.md) ^3.1.1
- [@graphql-codegen/cli](https://npm.io/package/@graphql-codegen/cli.md) ^2.7.0
- [@graphql-codegen/schema-ast](https://npm.io/package/@graphql-codegen/schema-ast.md) ^2.4.1
- [@graphql-codegen/typescript](https://npm.io/package/@graphql-codegen/typescript.md) ^2.6.0
- [@graphql-codegen/typed-document-node](https://npm.io/package/@graphql-codegen/typed-document-node.md) ^2.2.14
- [@graphql-codegen/typescript-operations](https://npm.io/package/@graphql-codegen/typescript-operations.md) ^2.4.3
- [@graphql-codegen/near-operation-file-preset](https://npm.io/package/@graphql-codegen/near-operation-file-preset.md) ^2.2.15

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2022-07-06

## README

# gql-generator-full-blown-preset

🛩 A cool and opinionated base configuration for [Graphql Code Generator](https://www.graphql-code-generator.com/). 

## Features
- Generates a base `schema.graphql` file using [`@graphql-codegen/schema-ast`](https://www.graphql-code-generator.com/plugins/schema-ast)
- Generates a base `schema.generated.ts` with typings for the base schema using [`@graphql-codegen/typescript`](https://www.graphql-code-generator.com/plugins/typescript)
- Generates typings files for each of your operations files using [`@graphql-codegen/typescript`](https://www.graphql-code-generator.com/plugins/near-operation-file-preset)
- Generate `TypedDocumentNode` instead of hooks/composables using [`@graphql-codegen/typed-document-node`](https://www.graphql-code-generator.com/plugins/typed-document-node)
- Use PascalCase as default naming convention.
- Remove `__typenames` from types.

## Installation
```
pnpm add -D @julr/gql-generator-full-blown-preset 
pnpm add @graphql-typed-document-node/core
```

If you are using pnpm you must hoist the `@graphql-codegen` dependencies to the root modules directory. This could be done by adding the following content to your project .npmrc file :
```
public-hoist-pattern[]=@graphql-codegen/*
```

## Usage
Create a `graphql.config.js` file in the root of your project.
```js
require("dotenv").config();
const defineConfig = require("@julr/gql-generator-full-blown-preset");

module.exports = defineConfig({
  // The path to your GraphQL schema file. Can be a local file or a remote URL.
  schema: {
    url: process.env.HASURA_URL,
    secret: process.env.HASURA_SECRET,
  },

  // Since we're using graphql-config, you may need to define 
  // additional extensions configurations
  additionalExtensions: {
    myExtension: {
      config: 'foo'
    }
  }
});
```

## License

[MIT](./LICENSE.md) License © 2022 [Julien Ripouteau](https://github.com/Julien-R44)

---
_Source: https://npm.io/package/@julr/gql-generator-full-blown-preset · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
