Skip to content

Commit

Permalink
updated readme example
Browse files Browse the repository at this point in the history
  • Loading branch information
viniychuk committed Jul 13, 2016
1 parent de15db9 commit fd10db6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ $postType = new ObjectType([
'likeCount' => 2,
];
},
])
]);
```

And in comparison take a look at the Object oriented version with all the same fields:
Expand All @@ -607,7 +607,8 @@ class PostType extends AbstractObjectType
public function build(TypeConfigInterface $config)
{
$config
->addField('title', new NonNullType(new StringType()), [
->addField('title', [
'type' => new NonNullType(new StringType()),
'description' => 'This field contains a post title',
'isDeprecated' => true,
'deprecationReason' => 'field title is now deprecated',
Expand Down

0 comments on commit fd10db6

Please sign in to comment.