Skip to content

Commit

Permalink
Added new commands: graphql:play, graphql:update_schema and graphql:s…
Browse files Browse the repository at this point in the history
…ee_graph

Added new packages on DEV: graphql-cli, graphql-cli-voyager
Created schema file of example graphql service
Added .graphqlconfig file for working with graphql easily
Updated **Commands** doc
  • Loading branch information
Sly777 committed Aug 2, 2017
1 parent a078574 commit d73dc58
Show file tree
Hide file tree
Showing 6 changed files with 2,978 additions and 53 deletions.
8 changes: 8 additions & 0 deletions .graphqlconfig
@@ -0,0 +1,8 @@
{
"schemaPath": "libraries/graphql_schemas/schema.graphql",
"extensions": {
"endpoints": {
"default": "https://api.graph.cool/simple/v1/cixmkt2ul01q00122mksg82pn"
}
}
}
38 changes: 31 additions & 7 deletions docs/Commands.md
Expand Up @@ -2,19 +2,43 @@

## Commands (WIP)

#### create:page
_command:_ yarn run create:page (or npm run create:page)
### create:page
_command:_ ```yarn run create:page``` (or ```npm run create:page```)

It helps to create new page easiest way. After run this command, It will ask some questions and boom! It's ready.

![Alt Text](https://media.giphy.com/media/l0Iy6nmyS5p7hIAso/giphy.gif)
![create:page](https://media.giphy.com/media/l0Iy6nmyS5p7hIAso/giphy.gif)

#### create:route
_command:_ yarn run create:route (or npm run create:route)
### create:route
_command:_ ```yarn run create:route``` (or ```npm run create:route```)

It helps to create new route for your pages.

#### analyze
_command:_ yarn run analyze (or npm run analyze)
### analyze
_command:_ ```yarn run analyze``` (or ```npm run analyze```)

Analyze the packages and files that you used on your app.

## GraphQL Commands

On these commands, RAN is using [graphql-config](https://github.com/graphcool/graphql-config), [graphql-cli](https://github.com/graphcool/graphql-cli), [graphql-voyager](https://github.com/APIs-guru/graphql-voyager) and [grapql-cli-voyager](https://github.com/graphcool/graphql-cli-voyager). The important thing is that you need to update your [/.graphqlconfig](/.graphqlconfig) file with your real graphql url to work with them. For details info how to work with ```.graphgqlconfig``` file, please check [graphql-config](https://github.com/graphcool/graphql-config).

##### **Important Info**
Don't save secure information in ```.graphqlconfig``` file. Use [Environment variables](/docs/Architecture/environment-variables.md) for that. On RAN boilerplate, We are using hard-coded example graphql url inside of that but It doesn't mean it's secure way.

### graphql:play
_command:_ ```yarn run graphql:play``` (or ```npm run graphql:play```)

It opens the browser to play (or work :) on your graphql server.

![graphql:play](https://media.giphy.com/media/xT39Dh0URQoc8IUOxW/giphy.gif)

### graphql:update_schema
_command:_ ```yarn run graphql:update_schema``` (or ```npm run graphql:update_schema```)

Updates your local schema file with updated one from server

### graphql:see_graph
_command:_ ```yarn run graphql:see_graph``` (or ```npm run graphql:see_graph```)

See your graphQL API as a interactive graph

0 comments on commit d73dc58

Please sign in to comment.