Skip to content

Commit

Permalink
Remove the relationship-utils tests
Browse files Browse the repository at this point in the history
  • Loading branch information
singhArmani committed Jul 30, 2020
1 parent 2a41c29 commit b784881
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 790 deletions.
2 changes: 1 addition & 1 deletion .changeset/hot-olives-reply.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'@keystonejs/keystone': major
---

Removed the `keystone.createItems` and `keystone.createItem` method. This has been replaced with the corresponding `createItems` and `createItem` function in `@keystonejs/server-side-graphql-client`.
Removed the `keystone.createItems` and `keystone.createItem` methods. These have been replaced with the corresponding functions `createItems` and `createItem` in `@keystonejs/server-side-graphql-client`.

If you have examples like:

Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/initial-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ order: 3
# Seeding data

This guide will show you how to create a `User` list and add initial data to it
using the `createItems` method. This process is also called `seeding`.
using the `createItems` function. This process is also called `seeding`.

> **Note:** In a previous chapter the code was split up over separate files, while this is preferred in a real code base, in this part everything is put in one file for clarity reasons.
Expand Down Expand Up @@ -84,7 +84,6 @@ The [`createItems`](https://www.keystonejs.com/keystonejs/server-side-graphql-cl
- `listKey`: the Keystone list name
- `items`: the array of objects to be created.


```javascript
createItems({
keystone,
Expand Down Expand Up @@ -269,7 +268,7 @@ const keystone = new Keystone({
name: 'John Duck',
email: '[email protected]',
password: 'dolphins',
posts: {
posts: {
// Filtering list of items where title contains the word `React`
connect: post.filter(p => /\bReact\b/i.test(p.title)).map(i => ({ id: i.id })),
},
Expand All @@ -287,6 +286,7 @@ const keystone = new Keystone({
},
});
```
Clear the database, start the Keystone application and visit the Admin UI. Take a look at the user `John Duck`, he has two posts associated with him (there were two posts with the word `React` in the `title`).
Clear the database, start the Keystone application and visit the Admin UI. Take a look at the user `John Duck`, he has two posts associated with him (there were two posts with the word `React` in the `title`).
If you want to explore other utility functions for `CRUD` operations, please refer to [server-side GraphQL client](https://www.keystonejs.com/keystonejs/server-side-graphql-client) API for more details.
Loading

0 comments on commit b784881

Please sign in to comment.