Time
Package name | Weekly Downloads | Version | License | Updated |
---|---|---|---|---|
@graphql-codegen/time | May 24th, 2023 |
Installation
npm i -D @graphql-codegen/time
Config API Reference
format
type: string
default: YYYY-MM-DDTHH:mm:ssZ
Customize the Moment format of the output time.
Usage Examples
codegen.ts
import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
schema: 'https://localhost:4000/graphql',
documents: ['src/**\/*.tsx'],
generates: {
'path/to/file.ts': {
plugins: ['time'],
config: {
format: 'DD.MM.YY'
},
},
},
};
export default config;
message
type: string
default: 'Generated on'
Customize the comment message
Usage Examples
codegen.ts
import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
schema: 'https://localhost:4000/graphql',
documents: ['src/**\/*.tsx'],
generates: {
'path/to/file.ts': {
plugins: ['time'],
config: {
message: 'The file generated on: '
},
},
},
};
export default config;