Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace request with isomorphic-unfetch #315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/openapi-to-graphql/lib/index.js.map

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions packages/openapi-to-graphql/lib/resolver_builder.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { ConnectOptions } from './types/options';
import { ConnectOptions, RequestOptions } from './types/options';
import { Operation } from './types/operation';
import { ResolveFunction, SubscriptionIterator } from './types/graphql';
import { PreprocessingData } from './types/preprocessing_data';
import * as NodeRequest from 'request';
declare type GetResolverParams = {
operation: Operation;
argsFromLink?: {
Expand All @@ -12,7 +11,7 @@ declare type GetResolverParams = {
responseName?: string;
data: PreprocessingData;
baseUrl?: string;
requestOptions?: NodeRequest.OptionsWithUrl;
requestOptions?: RequestOptions;
};
declare type GetSubscribeParams = {
operation: Operation;
Expand Down
60 changes: 42 additions & 18 deletions packages/openapi-to-graphql/lib/resolver_builder.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/openapi-to-graphql/lib/resolver_builder.js.map

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions packages/openapi-to-graphql/lib/types/options.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as NodeRequest from 'request';
import { ResolveFunction, ResolveObject, GraphQLOperationType } from './graphql';
/**
* Type definition of the options that users can pass to OpenAPI-to-GraphQL.
Expand All @@ -19,6 +18,9 @@ export declare type Report = {
numMutationsCreated: number;
numSubscriptionsCreated: number;
};
export declare type RequestOptions = {
[key: string]: any;
};
export declare type ConnectOptions = {
[key: string]: boolean | number | string;
};
Expand Down Expand Up @@ -126,7 +128,7 @@ export declare type Options = {
* calls to the API backend.
* e.g. Setup the web proxy to use.
*/
requestOptions?: NodeRequest.OptionsWithUrl;
requestOptions?: RequestOptions;
/**
* Allows to override or add options to the PubSub connect object used to make
* publish/subscribe to the API backend.
Expand Down Expand Up @@ -329,7 +331,7 @@ export declare type InternalOptions = {
* calls to the API backend.
* e.g. Setup the web proxy to use.
*/
requestOptions?: NodeRequest.OptionsWithUrl;
requestOptions?: RequestOptions;
/**
* Allows to override or add options to the PubSub connect object used to make
* publish/subscribe to the API backend.
Expand Down
Loading