Skip to content

Commit

Permalink
Add demo gif 🎬
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Mar 22, 2017
1 parent d866bfd commit e97a155
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Mock your future API or extend the existing API with realistic data from [faker.js](....). __No coding required__.
All you need is to write [GraphQL IDL](https://www.graph.cool/docs/faq/graphql-schema-definition-idl-kr84dktnp0/). Don't worry, we will provide you with examples in our IDL editor.

![demo-gif](./docs/demo.gif)

## How does it work
We use `@fake` directive to let you specify how to fake data. And if 60+ fakers is not enough for you, just use `@examples` directive to provide examples. Just add a directive to any field or custom scalar definition:

Expand All @@ -30,19 +32,19 @@ or

yarn global add graphql-faker


## TL;DR

Mock GraphQL API based on IDL and open interactive editor:

graphql-faker ./my-idl.grqphql --open

Extend real data from SWAPI with faked based on extension IDL:

graphql-faker ./ext-swapi.grqphql --extend http://swapi.apis.guru

Extend real data from GitHub API with faked based on extension IDL (you can get token [here](https://developer.github.com/early-access/graphql/guides/accessing-graphql/#generating-an-oauth-token)):

graphql-faker ./ext-gh.graphql --extend https://api.github.com/graphql \
--header "Authorization: bearer <TOKEN>"

Expand Down
Binary file added docs/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e97a155

Please sign in to comment.