Skip to content

Commit 989a0dd

Browse files
committed
more proofreading, adding links, and reorganizing the left-hand nav
1 parent ec58803 commit 989a0dd

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

website/pages/docs/_meta.ts

+9
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ const meta = {
1919
'constructing-types': '',
2020
'oneof-input-objects': '',
2121
'defer-stream': '',
22+
'-- 2.5': {
23+
type: 'separator',
24+
title: 'Testing',
25+
},
26+
'testing-graphql-servers': '',
27+
'testing-approaches': '',
28+
'testing-operations': '',
29+
'testing-resolvers': '',
30+
'testing-best-practices': '',
2231
'-- 3': {
2332
type: 'separator',
2433
title: 'FAQ',

website/pages/docs/testing-approaches.mdx

+3-11
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ When you write unit tests, you’re checking that the resolver:
2323
- Handles errors properly
2424
- Returns the correct result
2525

26+
### When to use unit tests
27+
2628
Unit tests are fast and provide tight feedback loops. They're especially useful when:
2729

2830
- Developing new resolvers
@@ -151,17 +153,7 @@ Unit and integration tests are complementary, not competing.
151153
Start with unit tests when building new features, then layer in integration tests
152154
to validate schema wiring and catch regressions as your API grows.
153155

154-
## When E2E tests add value
155-
156-
E2E tests simulate full-stack conditions. Use them when:
157-
158-
- Testing authentication and authorization flows
159-
- Validating infrastructure behavior such as networking and retries
160-
- Coordinating between multiple services and APIs
161-
162-
E2E tests are slower and require full setup, so reserve them for critical flows.
163-
164-
## Choosing the right balance
156+
## Choose a testing approach
165157

166158
There is no single correct approach to testing. Instead, a layered approach
167159
works best. In general:

website/pages/docs/testing-graphql-servers.mdx

+4-6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: Testing GraphQL Servers
33
sidebarTitle: Testing GraphQL Servers
44
---
55

6-
import { Tabs } from 'nextra/components';
7-
86
# Testing GraphQL Servers
97

108
## Why testing matters
@@ -74,7 +72,7 @@ Beyond simulating failures, consider testing resilience patterns like retries or
7472

7573
## Next steps
7674

77-
- Learn different types of tests for GraphQL servers to choose the right strategy for your project.
78-
- Explore how to test operations without running a server.
79-
- Understand how to unit test resolvers to catch logic errors early.
80-
- Apply best practices to scale testing to production.
75+
- Learn different [testing approaches](\..\testing-approaches.mdx) to choose the right strategy for your project.
76+
- Explore how to [test operations](\..\testing-operations.mdx) without running a server.
77+
- Understand how to [test resolvers](\..\testing-resolvers.mdx) to catch logic errors early.
78+
- Apply [best practices](\..\testing-best-practices.mdx) to scale testing to production.

0 commit comments

Comments
 (0)