From fdfa5ed087252927dfde66e05245cf751fddc56f Mon Sep 17 00:00:00 2001 From: AmirMasoud Date: Mon, 22 Oct 2018 12:03:44 +0330 Subject: [PATCH] Update advanced.md --- docs/advanced.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/advanced.md b/docs/advanced.md index 8a103742..f14232c5 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -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 @@ -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 @@ -43,7 +43,7 @@ query FetchUser{ you need to add post field and implement resolveField method in UserType: -``` +```php public function fields() { return [ @@ -457,4 +457,4 @@ For example, if you use homestead: ``` http://homestead.app/graphql?query=query+FetchUsers{users{uuid, email, team{name}}} -``` \ No newline at end of file +```