Skip to content

Commit d90b538

Browse files
borodayevnodkz
authored andcommitted
docs: refactor examples in readme
1 parent 700ad97 commit d90b538

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## 0.0.0-semantically-released (October 24, 2017)
44
This package publishing automated by [semantic-release](https://github.com/semantic-release/semantic-release).
5-
[Changelog](https://github.com/graphql-compose/graphql-compose-rest/releases) is generated automatically and can be found here: https://github.com/graphql-compose/graphql-compose-rest/releases
5+
[Changelog](https://github.com/graphql-compose/graphql-compose-json/releases) is generated automatically and can be found here: https://github.com/graphql-compose/graphql-compose-json/releases

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ You have a sample response object `restApiResponse` which you can pass to `graph
2828
```js
2929
// person.js
3030

31-
import composeWithRest from 'graphql-compose-json';
31+
import composeWithJson from 'graphql-compose-json';
3232

3333
const restApiResponse = {
3434
name: 'Anakin Skywalker',
@@ -49,7 +49,7 @@ const restApiResponse = {
4949
],
5050
};
5151

52-
export const PersonTC = composeWithRest('Person', responseFromRestApi);
52+
export const PersonTC = composeWithJson('Person', restApiResponse);
5353
export const PersonGraphQLType = PersonTC.getType();
5454
```
5555

@@ -136,7 +136,7 @@ const restApiResponse = {
136136
};
137137
}
138138

139-
const PersonTC = composeWithRest('Person', responseFromRestApi);
139+
const PersonTC = composeWithJson('Person', restApiResponse);
140140
```
141141
142142
In case you need to separate custom field definition from your response object there are `graphql-compose` methods made for this purpose.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "graphql-compose-json",
33
"version": "0.0.0-semantically-released",
4-
"description": "Plugin for `graphql-compose` which derive a graphql types from a REST response.",
4+
"description": "This is a plugin for `graphql-compose`, which generates GraphQLTypes from any JSON.",
55
"files": [
66
"lib"
77
],

0 commit comments

Comments
 (0)