Skip to content

Commit 8acfd04

Browse files
authored
Merge pull request #111 from Youth8/fix-backward-compatible-issue
fix: make 'name' property optional in IDataSource interface
2 parents 6c1a772 + e051fc8 commit 8acfd04

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

dist/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface ComponentContext extends Record<string, unknown> {
1212
}
1313
export type ContextFunction = ((context: Record<string, unknown>) => any);
1414
export interface IDataSource {
15-
name: string;
15+
name?: string;
1616
[key: string | symbol]: any;
1717
}
1818
/**
@@ -86,7 +86,7 @@ export interface IGraphQLComponent<TContextType extends ComponentContext = Compo
8686
* @template TContextType - The type of the context object
8787
* @implements {IGraphQLComponent}
8888
*/
89-
export default class GraphQLComponent<TContextType extends ComponentContext = ComponentContext> implements IGraphQLComponent {
89+
export default class GraphQLComponent<TContextType extends ComponentContext = ComponentContext> implements IGraphQLComponent<TContextType> {
9090
_schema: GraphQLSchema;
9191
_types: TypeSource;
9292
_resolvers: IResolvers<any, TContextType>;

0 commit comments

Comments
 (0)