Skip to content

Commit

Permalink
Final touches on README
Browse files Browse the repository at this point in the history
  • Loading branch information
brunogsa committed Jul 31, 2019
1 parent 61e236f commit 30b37fa
Showing 1 changed file with 12 additions and 37 deletions.
49 changes: 12 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,69 +50,44 @@ const jobAd = {
};
```

Build your GraphQL schema at `backend/schema.graphql`!
Build your GraphQL schema at `schema.graphql` file!

You can test it with:
```sh
$ cd backend/
$ npm install
$ npm run lint:graphql
```

Reference:
- https://graphql.org/learn/schema/

Solution on branch `solution/schema`.
Solution on branch `solution/1`.


## Hands-on 2/3: Plugging GraphQL into your Back-end
## Hands-on 2/3: My first Resolver

Now, implement your resolvers at `backend/resolvers/`!
Now, implement some basic resolvers `resolvers/` folder.

You can test it with:
```sh
$ cd backend/
$ npm install
$ npm start # http://localhost:3000/graphql
$ npm run test:graphql
```

Reference:
- https://graphql.org/learn/execution/
- https://graphql.org/graphql-js/basic-types/
- https://graphql.org/graphql-js/passing-arguments/
- https://graphql.org/graphql-js/object-types/

Solution on branch `solution/backend`.


## Hands-on 3/3: GraphiQL and Plugging GraphQL into your Front-end

First, let's explore your GraphQL API on the server:
```sh
# Up your API
$ cd backend/
$ npm install
$ npm start

# Starts GraphiQL, an amazing tool
$ cd frontend/
$ npm install
$ npm run graphiql # Now try some GraphQL queries at localhost:6666
```
Solution on branch `solution/2`.

Now, starts your Front-end:
```sh
$ cd frontend/
$ npm install
$ npm start # Go to localhost:8080 to see the available candidate profiles!
```

No data, right? :B
## Hands-on 3/3: Passing parameters to Resolvers

Go and implement your GraphQL query at `frontend/services/candidate-profiles.js`!
Test if it worked reloading your app!
Implement the new resolvers at `resolvers/` folder.
More tests were added, so feel free to run the same scripts :)

Reference:
- ?
- https://graphql.org/graphql-js/passing-arguments/
- https://graphql.org/graphql-js/object-types/

Solution on branch `solution/frontend`.
Solution on branch `solution/3`.

0 comments on commit 30b37fa

Please sign in to comment.