# graphql-codegen-frontend

This package includes the shareable graphql-codegen configuration to be used by frontend suite applications.

## How to use

Create a file named `graphql.config.ts` containing:

```typescript
export { default } from '@theorchard/graphql-codegen-config-frontend';
```

Modify your package.json to contain the following command:

```json
{
    ...

    "scripts":{
        ...

        "generate:types": "graphql-codegen",
    },
}
```

### Modifying the configuration

If you need to tweak the configuration, a config object can be passed to the config generator:

```typescript
import { withConfig } from '@theorchard/graphql-codegen-config-frontend';

export default withConfig({
    scalars: {
        Date: 'string',
    },
});
```
