Skip to content

Commit

Permalink
Merge branch 'master' into replace-build-field-types-with-preconstruc…
Browse files Browse the repository at this point in the history
…t-in-most-field-packages
  • Loading branch information
emmatown authored Aug 6, 2020
2 parents 1c174f8 + a1658e7 commit abe347f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/tutorials/initial-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ The [`createItems`](https://www.keystonejs.com/keystonejs/server-side-graphql-cl
- `items`: the array of objects to be created.

```javascript
const { createItems } = require('@keystonejs/server-side-graphql-client');

createItems({
keystone,
listKey: 'User',
Expand All @@ -101,6 +103,8 @@ As an example in our schema, the `email` field has `isUnique:true` constraint, t
Example on how to `seed` the data upon database connection:

```javascript
const { createItems } = require('@keystonejs/server-side-graphql-client');

const keystone = new Keystone({
adapter: new MongooseAdapter(),
onConnect: async keystone => {
Expand Down

0 comments on commit abe347f

Please sign in to comment.