Skip to content

Commit 5588640

Browse files
authored
Merge pull request #60 from dotansimha/fix-schemaOptions
Fixes for `schemaOptions`
2 parents 6a7c7f8 + da77db6 commit 5588640

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.changeset/spotty-lemons-hug.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 `schemaOptions` support

packages/plugin/src/parser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export function parseForESLint(code: string, options?: ParserOptions): GraphQLES
5050
const config = {
5151
...DEFAULT_CONFIG,
5252
...(options || {}),
53+
...(options?.schemaOptions || {}),
5354
};
5455

5556
let schema: GraphQLSchema = null;

packages/plugin/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { GraphQLESlintRuleListener } from './testkit';
77

88
export interface ParserOptions extends Omit<GraphQLParseOptions, 'noLocation'> {
99
schema?: string | string[];
10+
schemaOptions?: Record<string, any>;
1011
skipGraphQLConfig?: boolean;
1112
filePath?: string;
1213
}

0 commit comments

Comments
 (0)