Time
Package name | Weekly Downloads | Version | License | Updated |
---|---|---|---|---|
@graphql-codegen/time | Aug 8th, 2022 |
Installation
yarn add -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;
Last updated on August 10, 2022