Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(schema): Fix directives cannot be extends #626

Merged
merged 5 commits into from
May 7, 2020

Conversation

lijianzhang
Copy link
Contributor

For Example:

@ObjectType({ isAbstract: true })
class INode {
    @Field(() => ID)
    id!: string

    @Directive('@formatDate')
    @Field(() => Timestamp)
    createdAt: Date;

    @Directive('@formatDate')
    @Field(() => Timestamp)
    updatedAt: Date;
}

//  People class cannot extends INode Filed directives  
@ObjectType()
class People extends INode {

}

@codecov
Copy link

codecov bot commented May 6, 2020

Codecov Report

Merging #626 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #626   +/-   ##
=======================================
  Coverage   95.25%   95.25%           
=======================================
  Files          78       78           
  Lines        1433     1433           
  Branches      284      284           
=======================================
  Hits         1365     1365           
  Misses         65       65           
  Partials        3        3           
Impacted Files Coverage Δ
src/schema/utils.ts 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b815600...b4e3a13. Read the comment docs.

MichalLytek
MichalLytek previously approved these changes May 6, 2020
Copy link
Owner

@MichalLytek MichalLytek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks but please also add a test case for that issue and fill the changelog 😉

@MichalLytek MichalLytek added Bugfix 🐛 🔨 PR that fixes a known bug Community 👨‍👧 Something initiated by a community labels May 6, 2020
@MichalLytek MichalLytek added this to the 1.0.0 release milestone May 6, 2020
@lijianzhang
Copy link
Contributor Author

@MichalLytek Thanks for your reminder. I have added test cases 😅

Copy link
Owner

@MichalLytek MichalLytek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One step closer 😄

CHANGELOG.md Outdated Show resolved Hide resolved
tests/functional/directives.ts Outdated Show resolved Hide resolved
tests/functional/directives.ts Outdated Show resolved Hide resolved
@lijianzhang
Copy link
Contributor Author

@MichalLytek I have dealt with it. thank you for your patience to point out these problems

and type-graphql is awesome.

@MichalLytek MichalLytek merged commit 703323e into MichalLytek:master May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix 🐛 🔨 PR that fixes a known bug Community 👨‍👧 Something initiated by a community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants