Skip to content

Commit fbe0beb

Browse files
Update testing.mdx, fix Mutation and Query Operations example (#3438)
1 parent 9781eb7 commit fbe0beb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

website/src/pages/docs/features/testing.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,11 @@ function assertSingleValue<TValue extends object>(
8181
}
8282
}
8383

84+
const yoga = createYoga({ schema })
85+
8486
const executor = buildHTTPExecutor({
85-
fetch: yoga.fetch
87+
fetch: yoga.fetch,
88+
endpoint: `http://yoga/graphql`,
8689
})
8790

8891
const result = await executor({
@@ -97,8 +100,9 @@ assertSingleValue(result)
97100

98101
console.assert(
99102
result.data?.greetings === 'Hello World!',
100-
`Expected 'Hello World!' but got ${executionResult.data.greetings}`
103+
`Expected 'Hello World!' but got ${result.data.greetings}`
101104
)
105+
102106
```
103107

104108
### Subscription Operations

0 commit comments

Comments
 (0)