Skip to content

chrissnyder/flow-graphql-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flow-graphql-webpack-plugin

A webpack plugin that takes a GraphQL schema and generates useful things from it.

Currently it only searches types for enums and generates constants from it. In the future, I'd like it to output flow type annotations as well.

Usage

Add it to your webpack config as per usual for a plugin:

plugins: [
  new FlowGraphQLPlugin(options)
]

The options object takes the following shape:

Key Required Description Default
schemaPath Yes Path to your GraphQL schema.json file. n/a
outputPath Yes Path where you want the generated constants to go. n/a
fileName No Name of the constants file. enum.js
toTypes No Dot-notation path to the location of types in your schema. data.__schema.types
enumTypeKind No Type kind for enums ENUM
enumTemplate No Output template format for each enum. Function (look in source)

About

A webpack plugin for use with GraphQL/Flow apps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published