Search code examples
reactjsgraphqlgraphcool

Graphcool-framework cli on local: "Unknown flag –schema"


I was following a video tutorial on GraphQL and React.

The tutorial initializes graphcool-framework using this command:

graphcool-framework init --schema https://graphqlbin.com/hn-starter.graphql --name Hackernews

When I executed this command, I got this error:

Unknown flag --schema

Solution

  • This is because the new version of graphcool-framework doesn't have the flag --schema if you want to follow the video-tutorials you better install the old version(that is the version they are using in the videos). To install the version you need of graphcool-framework do: sudo npm install -g graphcool@0.4