mirror of
https://github.com/vale981/grapher
synced 2025-03-04 09:01:40 -05:00
Grammer fix & clarification in migration docs
This commit is contained in:
parent
51a59531c4
commit
c9b23e2ae0
2 changed files with 26 additions and 3 deletions
27
MIGRATION.md
27
MIGRATION.md
|
@ -6,8 +6,31 @@ When you use reducers with a body that uses a link that should return a single r
|
|||
|
||||
### From 1.2 to 1.3
|
||||
|
||||
SimpleSchema has been completely removed and it will no longer extend your Collection's schema automatically, therefore,
|
||||
if you have configured links you have to manually add them.
|
||||
SimpleSchema has been completely removed and it will no longer extend your Collection's schema automatically, therefore, if you have configured links you have to manually add them.
|
||||
|
||||
For example the following link:
|
||||
|
||||
```js
|
||||
Users.addLinks({
|
||||
post: {
|
||||
type: 'one',
|
||||
collection: Posts,
|
||||
field: 'postId'
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
Requires the respective field in your Collection's schema:
|
||||
|
||||
```js
|
||||
// schema for Users
|
||||
SimpleSchema({
|
||||
postId: {
|
||||
type: String,
|
||||
optional: true
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
The `metadata` link configuration is no longer an object, but a `Boolean`
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ Posts.createQuery({
|
|||
})
|
||||
```
|
||||
|
||||
The query above will fetch as `comments` only the ones that have been approved and that are linekd with the `post`.
|
||||
The query above will fetch as `comments` only the ones that have been approved and that are linked with the `post`.
|
||||
|
||||
The `$filter` function shares the same `params` across all collection nodes:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue