aerogear/create-graphql

Refactor to support plugin like babel

Aperta

#59 aperta il 6 feb 2017

 (9 commenti) (1 reazione) (0 assegnatari)JavaScript (51 fork)batch import
enhancementhelp wantednew feature

Metriche repository

Star
 (440 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Babel plugin object example:

type PluginObject = {
  pre?: Function;
  post?: Function;
  manipulateOptions?: Function;

  visitor: ?{
    [key: string]: Function | {
      enter?: Function | Array<Function>;
      exit?: Function | Array<Function>;
    }
  };
};

each babel plugin returns an object like this.

we should think in CreateGraphQL PluginObject as well.


  • Separate mongoose schema to a plugin;
  • Separate relay templates to a plugin (figure out how to best do this);
  • Create boilerplate projects for Create-GraphQL plugins;
  • Handle plugins property on .graphqlrc.

Guida contributor