Skip to content

Commit

Permalink
Test Async and Sync modes
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilkisiela committed Mar 17, 2020
1 parent 28ff7fc commit 1b979a3
Show file tree
Hide file tree
Showing 4 changed files with 245 additions and 195 deletions.
6 changes: 4 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ const defaultLoadConfigOptions: LoadConfigOptions = {
configName: defaultConfigName,
};

export async function loadConfig(options: LoadConfigOptions): Promise<GraphQLConfig | undefined> {
export async function loadConfig(
options: LoadConfigOptions,
): Promise<GraphQLConfig | undefined> {
const {
filepath,
configName,
Expand Down Expand Up @@ -70,7 +72,7 @@ export async function loadConfig(options: LoadConfigOptions): Promise<GraphQLCon
}
}

export async function loadConfigSync(options: LoadConfigOptions) {
export function loadConfigSync(options: LoadConfigOptions) {
const {
filepath,
configName,
Expand Down
2 changes: 1 addition & 1 deletion src/project-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export class GraphQLProjectConfig {
out?: 'GraphQLSchema' | 'DocumentNode' | 'string',
): GraphQLSchema | DocumentNode | string {
out = out || 'GraphQLSchema';

if (out === 'GraphQLSchema') {
return this._extensionsRegistry.loaders.schema.loadSchemaSync(pointer);
}
Expand Down
Loading

0 comments on commit 1b979a3

Please sign in to comment.