graphql-codegen-flow-documents plugin generates Flow types based on your
GraphQLSchema and your GraphQL documents.
It generates types for your GraphQL documents: Query, Mutation, Subscription and Fragment.
This plugin requires you to use
graphql-codegen-flow as well, because it depends on it's types.
$ npm install graphql-codegen-flow-documents
The output of this plugin can be controlled using a specified config file which consists of the fields below.
skipTypename (default value:
__typename field for the output types. If you still add
__typename manually in some selection sets, it will still generate it.
namingConvention (default value:
You can override the naming conversion by pointing to a specific function in a module or file (for example:
This will effect all the name conversions of the module.
Will map scalars to the predefined types.
# ... generates: path/to/file.flow.js: plugins: - flow config: scalars: Date: Date ]
You can also override built-in scalars, such as
typesPrefix (default value: '')
This will cause the codegen to prefix graphql type interfaces with the given value (if
I is defined as prefix, type
Foo will be generated as an interface named