This repository reproduces an issue with @graphql-tools/mock.
How to reproduce
- Clone this repo and
cd
into it yarn install
node index.js
This should produce the following output:
{
"data": {
"book": {
"id": 63,
"title": "Mock value for Book.title"
},
"booksViaMocks": [
{
"id": -52,
"title": "Mock value for Book.title"
},
{
"id": -99,
"title": "Mock value for Book.title"
},
{
"id": -43,
"title": "Mock value for Book.title"
}
],
"booksViaResolvers": [
null,
null,
null
],
"booksViaResolvers2": [
{
"id": 70,
"title": "Hello World"
},
{
"id": 59,
"title": "Hello World"
},
{
"id": 6,
"title": "Hello World"
}
]
}
}