graphql
graphql copied to clipboard
Allow passing of a configuration object to OGM.generate()
Is your feature request related to a problem? Please describe.
I'd like to have a bit more control over the types that are generated - specifically, I'd like to utilize some other graphql-codegen
plugins to create Types based upon my queries, which means I'd like access to multiple config options in the existing configuration object.
Describe the solution you'd like Allowing the passing of an options object that gets assigned here https://github.com/neo4j/graphql/blob/0586a960a51236547a55d419e0ce29acdc47fb3b/packages/ogm/src/generate.ts#L138 would be awesome!
Describe alternatives you've considered
I have generated my own types using similar code as what's in generate()
, but this causes me to have to run the typegen twice - once for OGM, and once for my queries. This also results in two files with significant overlaps.
Thanks for considering this!!