Skip to content
This repository has been archived by the owner on Feb 10, 2019. It is now read-only.

Update advanced.md #394

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

GraphQL offer you the possibility to use variables in your query so you don't need to "hardcode" value. This is done like that:

```
```javascript
query FetchUserByID($id: String) {
user(id: $id) {
id
Expand All @@ -30,7 +30,7 @@ http://homestead.app/graphql?query=query+FetchUserByID($id:String){user(id:$id){

If you want to query nested resource like that :

```
```javascript
query FetchUser{
user(id: 123456789) {
id
Expand All @@ -43,7 +43,7 @@ query FetchUser{

you need to add post field and implement resolveField method in UserType:

```
```php
public function fields()
{
return [
Expand Down Expand Up @@ -457,4 +457,4 @@ For example, if you use homestead:

```
http://homestead.app/graphql?query=query+FetchUsers{users{uuid, email, team{name}}}
```
```