Skip to content

Commit eb471b2

Browse files
author
Jason Kuhrt
authored
refactor: use graphql-request dep (#938)
1 parent b2ab924 commit eb471b2

File tree

8 files changed

+30
-348
lines changed

8 files changed

+30
-348
lines changed

docs/guides/testing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ import { createTestContext } from './__helpers'
5656
const { app } = createTestContext() // Error!
5757
```
5858

59+
## Test Context interface
60+
61+
The Test context interface is extensible by plugins. By default it includes basic control over the app and a GraphQL client instance ready to send queries and mutations to it.
62+
5963
## Without a database
6064

6165
**Example**

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"fs-jetpack": "^2.4.0",
4848
"get-port": "^5.1.0",
4949
"graphql": "^14.5.8",
50+
"graphql-request": "^2.1.0-next.1",
5051
"http-errors": "^1.7.3",
5152
"lodash": "^4.17.15",
5253
"node-fetch": "^2.6.0",
@@ -58,8 +59,8 @@
5859
"ts-morph": "^7.1.0",
5960
"ts-node": "^8.10.1",
6061
"tslib": "^2.0.0",
61-
"typescript": "3.9.x",
62-
"type-fest": "^0.15.0"
62+
"type-fest": "^0.15.0",
63+
"typescript": "3.9.x"
6364
},
6465
"devDependencies": {
6566
"@prisma-labs/prettier-config": "0.1.0",

src/lib/e2e-testing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
import * as Logger from '@nexus/logger'
66
import * as FS from 'fs-jetpack'
7+
import { GraphQLClient } from 'graphql-request'
78
import { IPty, IPtyForkOptions, IWindowsPtyForkOptions } from 'node-pty'
89
import * as Path from 'path'
910
import { ConnectableObservable, Observable, Subject } from 'rxjs'
1011
import { multicast } from 'rxjs/operators'
1112
import stripAnsi from 'strip-ansi'
1213
import { Database } from '../cli/commands/create/app'
1314
import { getTmpDir } from './fs'
14-
import { GraphQLClient } from './graphql-client'
1515
import { rootLogger } from './nexus-logger'
1616
import { PackageManagerType } from './package-manager'
1717

src/lib/graphql-client/index.spec.ts

Lines changed: 0 additions & 151 deletions
This file was deleted.

src/lib/graphql-client/index.ts

Lines changed: 0 additions & 129 deletions
This file was deleted.

src/lib/graphql-client/types.ts

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)