Skip to content

Commit 66ea8b9

Browse files
committed
Fix load schema pointer type
1 parent ed71811 commit 66ea8b9

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/famous-spiders-call.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-codegen/cli': patch
3+
---
4+
5+
Fix schema pointers type to allow an array of pointers

packages/graphql-codegen-cli/src/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ export class CodegenContext {
422422
return this._pluginContext;
423423
}
424424

425-
async loadSchema(pointer: Types.Schema): Promise<GraphQLSchema> {
425+
async loadSchema(pointer: Types.Schema | Types.Schema[]): Promise<GraphQLSchema> {
426426
const config = this.getConfig(defaultSchemaLoadOptions);
427427
if (this._graphqlConfig) {
428428
// TODO: SchemaWithLoader won't work here

packages/graphql-codegen-cli/src/load.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const defaultDocumentsLoadOptions = {
2828
};
2929

3030
export async function loadSchema(
31-
schemaPointers: UnnormalizedTypeDefPointer,
31+
schemaPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[],
3232
config: Types.Config
3333
): Promise<GraphQLSchema> {
3434
try {

0 commit comments

Comments
 (0)