I’m using GraphQL Code Generator to generate GraphQL documents for our clients to send through as queries for our API. In the graphql.ts file that’s produced by code gen, there are constants at the tail end of the file which are GraphQL documents. Their naming convention is a little strange though; none of the constants are uppercased as would be typical in TypeScript for a constant.
I noticed there was namingConvention
in the GraphQL Code Generator config but it doesn’t cover constants. Is there another place I can specify this?
An example of what the output looks like:
In my GraphQL documents file, I’ve got a query document:
query INVOICE_SUMMARY_ {
retrieveInvoices {
id
}
}
Ends up as: Invoice_Summary_Document
Candace Wong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.