@coex/graphql-vercajk
v3.4.0
Published
Collection of graphql tools
Readme
Graphql Vercajk
Collection of graphql tools
Installation
npm install @coexcz/graphql-vercajkUsage
Create config file in your root directory:
graphql-vercajk.config.mjs
export default {
apiUrl: 'https://api.example.com/graphql',
headers: {
'X-My-Header': 'my-header-value', // Can be use for specific headers if needed
},
operations: {
outDir: 'src/generated/operations',
constraintsDirectiveName: 'permissionsConstraints',
// mutationPrefix: 'mutation',
// queryPrefix: 'query',
},
inputs: {
outDir: 'src/generated/inputs',
fileNamePrefix: 'input',
constraintsDirectiveName: 'fieldConstraints',
},
enums: {
outDir: 'src/generated/enums',
fileNamePrefix: 'enum',
typesPath: '../types',
// postfix: '',
// isTranslatable: true,
},
};Add script to your package.json:
{
"scripts": {
"generate": "graphql-vercajk"
}
}Run script:
npm run generateDevelopment (this repository)
Create graphql-vercajk.config.mjs based on graphql-vercajk.config.sample.mjs
And run demo:
yarn demo