Skip to content

Commit

Permalink
feat(metadata): adjust typings and simplify Reflect API check
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalLytek committed Apr 17, 2024
1 parent 90bb172 commit 015939d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 461 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

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

## Features

- support other `Reflect` polyfills than `reflect-metadata` by checking only used `Reflect` API (#1102)

## Fixes

- properly override fields of `@ArgsType` classes in deeply nested inheritance chain (#1644)
Expand Down
6 changes: 5 additions & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@ First, we have to install the main package, as well as [`graphql-js`](https://gi
npm install graphql graphql-scalars type-graphql
```

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

```sh
npm install reflect-metadata
# or
npm install core-js
```

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

```ts
import "reflect-metadata";
// or
import "core-js/features/reflect";
```

## TypeScript configuration
Expand Down
Loading

0 comments on commit 015939d

Please sign in to comment.