@@ -83,9 +83,9 @@ yarn run example:graphql // A more complex example involving both REST and Graph
83
83
Definitions tell the seeder information about each resource defined in the persona. Think of each definition as each one of your REST APIs.
84
84
- ** method** (string|function) - HTTP method, defaults to "post"
85
85
- ** endpoint** (string|function) _ required_ - Resource URL
86
- - ** transport** (string|function) - "rest" or "graphql", defaults to "rest"
87
86
- ** headers** (object|function) - All headers required for the request
88
87
- ** body** (object|function) - Default request body, props can be overridden by the persona (_ REST ONLY_ )
88
+ - ** query** (string|function) - GraphQL query string (_ GRAPHQL ONLY_ )
89
89
- ** variables** (object|function) - Default GraphQL query/mutation variables (_ GRAPHQL ONLY_ )
90
90
- ** throttle** (number|function) - Throttle requests for this definition (some services can't handle concurrent requests)
91
91
``` javascript
@@ -113,7 +113,7 @@ export default {
113
113
# Personas
114
114
A test suite will have a collection of personas to test different scenarios and use cases. Persona data is modeled as parent-child relationships.
115
115
- ** type** (string) _ required_ - Resource type, must have a definition with the same name
116
- - ** params** (object|string) - Request body _ OR_ GraphQL query/mutation string
116
+ - ** params** (object|string) - Request body _ OR_ GraphQL variables
117
117
- ** children** (array) - An array of children resources which will be seeded after the parent is finished.
118
118
- ** childrenTemplate** (object) - A template for dynamically generating children.
119
119
- ** childrenCount** (number) - The number of children to generate, using the template
@@ -130,17 +130,7 @@ A test suite will have a collection of personas to test different scenarios and
130
130
},
131
131
" children" : [
132
132
{
133
- " type" : " client" ,
134
- " params" : `
135
- mutation ($menuId ID) {
136
- addMenuItem(name: "Hamburger", price: 10, menuId: $menuId) {
137
- id,
138
- name,
139
- price,
140
- menuId
141
- }
142
- }
143
- `
133
+ " type" : " client"
144
134
}
145
135
]
146
136
}
0 commit comments