Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
micimize committed Sep 25, 2020
1 parent cc2df60 commit e96363c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 28 deletions.
27 changes: 13 additions & 14 deletions packages/graphql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# 4.0.0-alpha.9 (2020-09-25)

:warning: breaking: the `cache.readFragment / cache.readFragment`` API has been reworked:
:warning: breaking: the `cache.readFragment / cache.readFragment` API has been reworked:
```diff
final fragDoc = gql(...);
final fragDoc = gql(...);

final idFields = { '__typename': 'MyType', 'id': 1 }
final idFields = { '__typename': 'MyType', 'id': 1 }

final fragmentData = {
'myField': 'updatedValue',
'someNewField': [
{'newData': false}
],
};
final fragmentData = {
'myField': 'updatedValue',
'someNewField': [
{'newData': false}
],
};

+ // or Fragment(document: fragDoc).asRequest(idFields: idFields)
+ final fragmentRequest = FragmentRequest(
Expand All @@ -21,13 +21,12 @@ final fragmentData = {
+ idFields: idFields,
+ );

cache.writeFragment(
cache.writeFragment(
- fragment: fragDoc,
- idFields: idFields,
+ fragmentRequest,
data: fragmentData,
);

+ fragmentRequest,
data: fragmentData,
);
```
This was done because I (@micimize) wanted to make it more consistent with `cache.readQuery`/`cache.writeQuery` before `beta`.

Expand Down
27 changes: 13 additions & 14 deletions packages/graphql_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# 4.0.0-alpha.9 (2020-09-25)

:warning: breaking: the `cache.readFragment / cache.readFragment`` API has been reworked:
:warning: breaking: the `cache.readFragment / cache.readFragment` API has been reworked:
```diff
final fragDoc = gql(...);
final fragDoc = gql(...);

final idFields = { '__typename': 'MyType', 'id': 1 }
final idFields = { '__typename': 'MyType', 'id': 1 }

final fragmentData = {
'myField': 'updatedValue',
'someNewField': [
{'newData': false}
],
};
final fragmentData = {
'myField': 'updatedValue',
'someNewField': [
{'newData': false}
],
};

+ // or Fragment(document: fragDoc).asRequest(idFields: idFields)
+ final fragmentRequest = FragmentRequest(
Expand All @@ -21,13 +21,12 @@ final fragmentData = {
+ idFields: idFields,
+ );

cache.writeFragment(
cache.writeFragment(
- fragment: fragDoc,
- idFields: idFields,
+ fragmentRequest,
data: fragmentData,
);

+ fragmentRequest,
data: fragmentData,
);
```
This was done because I (@micimize) wanted to make it more consistent with `cache.readQuery`/`cache.writeQuery` before `beta`.

Expand Down

0 comments on commit e96363c

Please sign in to comment.