Skip to content

Commit

Permalink
GraphQLObjectType: partial revert of graphql#3143, due to perf regres…
Browse files Browse the repository at this point in the history
…sion

Context: revert back to use bind since it way faster
Reverts: graphql@ac70985#diff-abcb97c7918631025353ea7ae5c1913946f00eb9d5d7ea9fe6060b6cfd92d480L761
  • Loading branch information
IvanGoncharov committed Apr 3, 2023
1 parent ee303a8 commit eb606de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/type/definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,10 @@ export class GraphQLObjectType<TSource = any, TContext = any> {
this.astNode = config.astNode;
this.extensionASTNodes = config.extensionASTNodes ?? [];

this._fields = () => defineFieldMap(config);
this._interfaces = () => defineInterfaces(config);
// prettier-ignore
// FIXME: blocked by https://github.com/prettier/prettier/issues/14625
this._fields = (defineFieldMap<TSource, TContext>).bind(undefined, config);
this._interfaces = defineInterfaces.bind(undefined, config);
}

get [Symbol.toStringTag]() {
Expand Down

0 comments on commit eb606de

Please sign in to comment.