Skip to content

Commit 77f9103

Browse files
committed
feat(metadata): adjust typings and simplify Reflect API check
1 parent 90bb172 commit 77f9103

File tree

8 files changed

+21
-464
lines changed

8 files changed

+21
-464
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
<!-- Here goes all the unreleased changes descriptions -->
66

7+
## Features
8+
9+
- support other `Reflect` polyfills than `reflect-metadata` by checking only used `Reflect` API (#1102)
10+
711
## Fixes
812

913
- properly override fields of `@ArgsType` classes in deeply nested inheritance chain (#1644)

docs/installation.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,20 @@ First, we have to install the main package, as well as [`graphql-js`](https://gi
1616
npm install graphql graphql-scalars type-graphql
1717
```
1818

19-
Also, the `reflect-metadata` shim is required to make the type reflection work:
19+
Also, the `Reflect.metadata()` shim is required to make the type reflection work:
2020

2121
```sh
2222
npm install reflect-metadata
23+
# or
24+
npm install core-js
2325
```
2426

2527
We must ensure that it is imported at the top of our entry file (before we use/import `type-graphql` or our resolvers):
2628

2729
```ts
2830
import "reflect-metadata";
31+
// or
32+
import "core-js/features/reflect";
2933
```
3034

3135
## TypeScript configuration

0 commit comments

Comments
 (0)