Skip to content

Commit e26a5d4

Browse files
authored
Fix issues with loading schemas from code-files (#242)
1 parent 0094548 commit e26a5d4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/eleven-crabs-lick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-eslint/eslint-plugin': patch
3+
---
4+
5+
Fix issues with loading schemas from code-files

packages/plugin/src/schema.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { CodeFileLoader } from '@graphql-tools/code-file-loader';
12
import { GraphQLFileLoader } from '@graphql-tools/graphql-file-loader';
23
import { JsonFileLoader } from '@graphql-tools/json-file-loader';
34
import { loadSchemaSync } from '@graphql-tools/load';
@@ -23,6 +24,7 @@ export const schemaLoaders: Loader<string, SingleFileOptions>[] = [
2324
new GraphQLFileLoader(),
2425
new JsonFileLoader(),
2526
new UrlLoader(),
27+
new CodeFileLoader(),
2628
];
2729

2830
export function getSchema(options: ParserOptions, gqlConfig: GraphQLConfig): GraphQLSchema | null {

0 commit comments

Comments
 (0)