Skip to content

Commit dc48906

Browse files
JsonKimAlan-Cha
authored andcommitted
Replace request with isomorphic-unfetch
Signed-off-by: Jason Kim <[email protected]>
1 parent 0c12ebf commit dc48906

File tree

10 files changed

+376
-257
lines changed

10 files changed

+376
-257
lines changed

packages/openapi-to-graphql/lib/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/resolver_builder.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { ConnectOptions } from './types/options';
1+
import { ConnectOptions, RequestOptions } from './types/options';
22
import { Operation } from './types/operation';
33
import { ResolveFunction, SubscriptionIterator } from './types/graphql';
44
import { PreprocessingData } from './types/preprocessing_data';
5-
import * as NodeRequest from 'request';
65
declare type GetResolverParams = {
76
operation: Operation;
87
argsFromLink?: {
@@ -12,7 +11,7 @@ declare type GetResolverParams = {
1211
responseName?: string;
1312
data: PreprocessingData;
1413
baseUrl?: string;
15-
requestOptions?: NodeRequest.OptionsWithUrl;
14+
requestOptions?: RequestOptions;
1615
};
1716
declare type GetSubscribeParams = {
1817
operation: Operation;

packages/openapi-to-graphql/lib/resolver_builder.js

Lines changed: 42 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/resolver_builder.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/types/options.d.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as NodeRequest from 'request';
21
import { ResolveFunction, ResolveObject, GraphQLOperationType } from './graphql';
32
/**
43
* Type definition of the options that users can pass to OpenAPI-to-GraphQL.
@@ -19,6 +18,9 @@ export declare type Report = {
1918
numMutationsCreated: number;
2019
numSubscriptionsCreated: number;
2120
};
21+
export declare type RequestOptions = {
22+
[key: string]: any;
23+
};
2224
export declare type ConnectOptions = {
2325
[key: string]: boolean | number | string;
2426
};
@@ -126,7 +128,7 @@ export declare type Options = {
126128
* calls to the API backend.
127129
* e.g. Setup the web proxy to use.
128130
*/
129-
requestOptions?: NodeRequest.OptionsWithUrl;
131+
requestOptions?: RequestOptions;
130132
/**
131133
* Allows to override or add options to the PubSub connect object used to make
132134
* publish/subscribe to the API backend.
@@ -329,7 +331,7 @@ export declare type InternalOptions = {
329331
* calls to the API backend.
330332
* e.g. Setup the web proxy to use.
331333
*/
332-
requestOptions?: NodeRequest.OptionsWithUrl;
334+
requestOptions?: RequestOptions;
333335
/**
334336
* Allows to override or add options to the PubSub connect object used to make
335337
* publish/subscribe to the API backend.

0 commit comments

Comments
 (0)