Skip to content

Commit

Permalink
Go
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Dec 7, 2022
1 parent e96464a commit 0affdb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/handlers/json-schema/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export default class JsonSchemaHandler implements MeshHandler {
return getGraphQLSchemaFromBundle(bundle, {
cwd: this.baseDir,
logger: this.logger,
fetch: this.fetchFn,
endpoint: this.config.endpoint,
operationHeaders: this.config.operationHeaders,
queryParams: this.config.queryParams,
Expand Down
4 changes: 3 additions & 1 deletion packages/loaders/json-schema/src/bundle.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { referenceJSONSchema, JSONSchemaObject, dereferenceObject } from 'json-machete';
import { DefaultLogger } from '@graphql-mesh/utils';
import { getDereferencedJSONSchemaFromOperations } from './getDereferencedJSONSchemaFromOperations.js';
import { Logger } from '@graphql-mesh/types';
import { Logger, MeshFetch } from '@graphql-mesh/types';
import { JSONSchemaOperationConfig, OperationHeadersConfiguration } from './types.js';
import { fetch as crossUndiciFetch } from '@whatwg-node/fetch';
import { GraphQLSchema } from 'graphql';
Expand Down Expand Up @@ -73,6 +73,7 @@ export async function createBundle(
export interface JSONSchemaLoaderBundleToGraphQLSchemaOptions {
cwd?: string;
logger?: Logger;
fetch?: MeshFetch;
endpoint?: string;
operationHeaders?: OperationHeadersConfiguration;
queryParams?: Record<string, string>;
Expand All @@ -94,6 +95,7 @@ export async function getGraphQLSchemaFromBundle(
{
cwd = process.cwd(),
logger = new DefaultLogger(name),
fetch = crossUndiciFetch,
endpoint: overwrittenBaseUrl,
operationHeaders: additionalOperationHeaders = {},
queryParams,
Expand Down

0 comments on commit 0affdb7

Please sign in to comment.